Support » Fixing WordPress » Excluding certain titles from search results?

  • I have a bunch of untitled posts all of them with the title “Untitled” I want to exclude these posts from the search… I’m using the query_posts() function but I havent been able to find anything that will allow me to do something like “FROM wp_posts WHERE post_title NOT ‘Untitled’ and …”

    Can anyone help me out?

Viewing 1 replies (of 1 total)
  • There’s the ‘posts_where’ filter which you can use. Remember that that will also exclude posts from the admin area, so use is_admin() in your filter.

Viewing 1 replies (of 1 total)
  • The topic ‘Excluding certain titles from search results?’ is closed to new replies.