With this plugin you can exclude any page, post or whatever from WordPress search results by checking off the corresponding checkbox on post page edit page..
On the plugin settings page you can also see the list of all the items that are hidden from search...
Upload search-exclude directory to the wp-content plugins directory.
Activate the plugin through 'Plugins WordPress.
Go to any post page edit page and check off the checkbox Exclude from Search Results if you don't want the post page to be shown in the search results...
Pass true if you want to hide posts pages, or false if you want show them in the search results..
Exclude from Search Results checkbox to be checked off by default for created posts, but not pages.
In this case you can add following code to your theme's function php excludeNewPostByDefault { if { do action, true ) } }.
In this case you could add following code to you functions php filterForProducts { return $exclude && 'product == $query->get }...
Browse the code, check out SVN repository, or subscribe to the development log by RSS...
Read more