how wordpress can un-slug a title

i still , don’t understand , how wordpress can understand what is this url refer to :
www.mysite.com/about-me/

they are using no identifier

Read More

if they using slug functions so how they can retain story information or in other word , how they change back the slugged title to select from database

Related posts

Leave a Reply

2 comments

  1. It processes the “pretty” URL and queries the database with that data. Of course slugs are checked to be unique on creation. Details are in the function url_to_postid() in the file wp-includes/rewrite.php.

    If you want to directly obtain the id from the slug you can query the database:

    SELECT ID
    FROM wp_posts
    WHERE post_name = '$slug'
    

    you might need to check wp_posts which is the default name, but it depends on the installation.

  2. This is just a guess:

    My guess is that they store the titles in a database, and make sure every title is unique. That way, they can do a look-up by title and know which item is coupled to that.