Skip to main content
edited tags
Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459
Source Link

How to disable Wordpress Search from Url?

I have a site with custom post types "books" and I just noticed that if you do site.com/[segementofBookName]

Wordpress redirects me to a post with that name or similar. I'm trying to figure out how to disable this, so that you can only navigate to a page if you know the exact url string.

So in other words, I have the following posts, type="books": To Kill a Mockingbird The Giver A Christmas Carol

If someone goes to mysite.com/carol, it will go to the post for A Christmas Carol. If someone goes to mysite.com/mockingbird it will find the post for "To Kill a Mockingbird". I would like to disable this functionality.

Any help would be greatly appreciated.