• How does WordPress turns a post title lika “thats-the-way” to “that’s the way” to search it MySQL?

Viewing 2 replies - 1 through 2 (of 2 total)
  • It doesn’t; it happens the other way around. The post_name field contains thats-the-way. When the post is first created, the title is run through sanitize_title() to create thats-the-way, which is then put in post_name. When querying the database, the supplied title in run through sanitize_title() and compared against post_name. We never really query against post_title. Instead, we query against the sanitized title in post_name.

    Thread Starter kemp

    (@kemp)

    I see.
    Much easier this way…
    thank’s for the info!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query string on WordPress. How it happens?’ is closed to new replies.