• Hello,

    I use some pages as banner to our clients as a means for them to update content on the homepage and such.

    I would like to remove this page and its children from being displayed on the search results.

    Is anyone able to help me with this please ?

    Thank you in advance for your help,

    Alexander

Viewing 2 replies - 1 through 2 (of 2 total)
  • What about adding a custom query to your search.php template along the lines of:

    <?php global $wp_query;
    query_posts(
    	array_merge(
    		array('post__not_in' => array(6,2,8)),
    		$wp_query->query
    	)
    );?>

    I made a secured part of my website. I have a login-page that has to be excluded from the search results, but also all of it’s (future) children. Is there an easy way to exclude this certain login page and all of it’s (grand)children without having to add the child-ID to the template every time I make a new secure page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude Specific Page(s) from the search results’ is closed to new replies.