Fix: If wpSearch breaks your admin searches.
-
wpSearch worked great for me. However, the /wp-admin/edit-pages.php and /wp-admin/edit.php pages showed no search results no matter what you searched for.
I was able to fix this by altering the code to ignore a few of the hooks when you are on an admin page.
Do a search for “Hooks for actions”. Then wrap the last three hook declarations in an if(is_admin()) like this:
[code]
//we only want to do these on the front end
if(!is_admin())
{
add_filter('posts_where', 'wpSearch_killSearch');
add_filter('post_limits', 'wpSearch_getLimit');
add_filter('the_posts', 'wpSearch_Query');
}
[/code]This fixed my admin searches. If you don’t have this problem, maybe wpSearch is giving you better searches in the admin. I dunno.
- The topic ‘Fix: If wpSearch breaks your admin searches.’ is closed to new replies.