The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

code for a template to exclude it from search? (2 posts)

  1. forgetcolor
    Posted 5 years ago #

    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.


  2. design_dolphin
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic