WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. forgetcolor
    Member
    Posted 3 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.

    thx!

  2. design_dolphin
    Member
    Posted 3 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