Hi Namita,
Thanks for reporting the problem in details. I will investigate and update you soon.
Best regards,
Roman
Hi,
Unfortunately I could not find Businessbox 1.4 theme for WordPress. The only thing I found so far is this template http://themeforest.net/item/businessbox-corporate-business-template/5180049 however it’s only html files, so it could not be the reason for Search Exclude to not work.
If you could provide me with the theme, I would then debug the issue ASAP.
Please contact me via Skype: romanpronskiy or email: [email protected] and I will do my best to resolve the problem.
Thank you,
Roman
Duplicating resolution from email conversation.
The thing is a conflict with WP e-Commerce plugin. However the workaround is pretty easy.
Option 1:
Add following code to your functions.php:
function fixSearchExclude() {
global $wp_filter;
foreach( $wp_filter['pre_get_posts'][10] as $hash => $callback ) {
if ($callback['function'][1] == 'searchFilter') {
unset($wp_filter['pre_get_posts'][10][$hash]);
$wp_filter['pre_get_posts'][1][$hash] = $callback;
}
}
}
fixSearchExclude();
Option 2:
Modify file wp-content/plugins/search-exclude/search-exclude.php and replace line:
add_filter('pre_get_posts', array($this, 'searchFilter'));
with following one:
add_filter('pre_get_posts', array($this, 'searchFilter'), 1);
Will include the fix into release when I investigate the impact on other setups and be sure that the solution is workable on all supported versions of WP.
Hey there.
This is happening to me too. Here is the site: http://bit.ly/1zpUEh3
I have tried both of your options individually and together but hiding pages and posts are not working.
Just go to the above site and then in the search bar type some random letters. Then, you will see. The marked pages are suppose to be excluded.
See this screenshot:
http://postimg.org/image/pgkralm8r/
Please let me know.
🙂
Hello,
In your case Search Exclude works as expected, because you can see that the page clearly says “No search results found…”
And the links below are widgets – Search Exclude never affects them. You could disable widgets from your Admin or by editing template.
Best regards,
Roman Pronskiy