[wp-hackers] Excluding pages/posts from search

Alex King lists at alexking.org
Tue Nov 20 18:25:18 GMT 2007


Hello All--

There are a number of approaches that work today for excluding pages/ 
posts from searches:

1. use a different page type
2. use a custom field
3. set the status to private
4. use an "exclude" list (Search Everything takes this approach I  
believe)

However most of these add a certain amount of overhead, and I think  
the WP development community would benefit from having a single  
standard way of doing this. I'd like to propose the addition of an  
"exclude_from_search" column to the posts table as that standard.

At Crowd Favorite, we need to do this fairly often for our clients.  
When using WP as a CMS, we will generally use pages/posts for certain  
portions of pages - say sidebar or footer content for a specific page/ 
section that the client still wants to be able to edit through the  
web interface (with all the standard formatting applied).

We'd be happy to write up the code and submit it as a patch if it's  
something that would be considered for inclusion in core.

I also wanted to raise this here on the list as I'm sure many of you  
have run into this in your own customization work and may have other  
clever approaches to solving this; or additional requirements for how  
it should work.

I look forward to your ideas and comments.

Cheers,
--Alex

Personal   http://alexking.org
Business   http://crowdfavorite.com
Schedule   http://alex.myfreebusy.com



More information about the wp-hackers mailing list