How Wordpress can destroy a header
I still don't understand how wordpress can figure out that this url is referring to: www.mysite.com/about-me/
they don't use id
if they use slug functions, so how can they save history information or in other words how they change back the punched header to select from the database
a source to share
It parses the "pretty" URL and queries the database with this data. Of course, the slug is checked for uniqueness upon creation. Details are in the function url_to_postid()
in the file wp-includes/rewrite.php
.
If you want to get the id from the bullet directly, you can query the database:
SELECT ID
FROM wp_posts
WHERE post_name = '$slug'
you may need to check wp_posts
which is the default name, but it depends on the installation.
a source to share