Support » Fixing WordPress » code for a template to exclude it from search?

  • Is there any code I could add to a template to make any pages that use that template not show up in the search results?

    I’ve seen some plugins that would allow me to specify individual pages to exclude from search, but I know that I want to exclude everything that uses an existing template, so it would be nice to get it done with one line in one file.

    thx!

Viewing 1 replies (of 1 total)
  • Hmm I’m not sure if you can do this for a template.

    But do a search on query_posts and search.php.

    It will allow you to customize your search.

Viewing 1 replies (of 1 total)
  • The topic ‘code for a template to exclude it from search?’ is closed to new replies.