Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

[SOLVED] Exclude page from Atahualpa search results

Old Oct 25, 2012, 11:36 AM
tracytrends's Avatar
15 posts · Dec 2011
[SOLVED] Exclude page from Atahualpa search results

I found how to exclude ALL pages from search results by adding the code below to the functions.php editor, but I want to only exclude one or two pages from search results.

function mySearchFilter($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
return $query;


I've been unsuccessful trying to Google a solution, so could you please suggest some coding?

thank you
Old Oct 25, 2012, 02:45 PM
juggledad's Avatar
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
try 'wordpress exclude page from search'
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old Oct 25, 2012, 03:44 PM
tracytrends's Avatar
15 posts · Dec 2011
Thank you.

One problem I had was where to post the coding. I was just copying it at the end of the edit file but now that I put it before the ?> it works. (probably obvious to coders, but not to me)

I appreciate your time,


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Customize Search Results page when "No Results" vCopia Center area post/pages 2 Mar 1, 2011 09:05 AM
How to exclude one page (large table) from search? eleanorb Atahualpa 3 Wordpress theme 5 Feb 5, 2011 08:28 PM
How to modify search results page unelma Center area post/pages 0 Jun 21, 2010 01:19 AM
Search Results page needs formatting black_cat Atahualpa 3 Wordpress theme 5 Aug 10, 2009 10:55 AM

All times are GMT -6. The time now is 10:07 AM.

Powered by vBulletin® Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.