WordPress Development Asked by Drewdavid on February 25, 2021
I’m trying to figure out how to rewrite URLs while dropping the original parameter (whether it’s a number or text); basically exactly what WP does with it’s clean permalinks
Does a database lookup table exist that matches the post ID# to the permalink string as set in the post editor?
No, for the most part.
WordPress stores its rewrite rules in the database. These are pattern-based rules for mapping URLs onto query parameters, and are determined by the permalink structure you've chosen (e.g. %post_name%
) and any additional structures plugins have provided.
For single items, WordPress extracts either %post_id%
or %post_name%
(slug) from the URL and fetches that post from the posts table.
Answered by sam on February 25, 2021
domain.com/posts/2003/somestuff
url, wp tring to find a pattern that match this url inside a rewrite_rules (array that stored in options
table by option name rewrite_rules
)This is human explanation without (almost without) any tech details. Hope its undestandable for everyone who didn't work with rewrite_rules
Answered by Oleg Butuzov on February 25, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP