Title: Filter &amp; Admin Search Don&#039;t work
Last modified: August 24, 2016

---

# Filter & Admin Search Don't work

 *  [Tony.N](https://wordpress.org/support/users/tonyn-1/)
 * (@tonyn-1)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/)
 * Hi,
 * I’ve WordPress 4.2.2 with latest version of woocommerce installed.
 * The website works fine from the front end. Searching products is fine and it 
   seems everything is ok.
 * On the back end, when I try to type a product’s name on the products page of 
   woocommerce, I get nothing found.
 * When trying to use the filter to select a specific product category, nothing 
   works too.
 * When I open a product’s page on woocommerce, everything seems fine. Products 
   have the right tags and categories.
 * The website was working fine on an older wordpress version and another theme.
   The changes I made just updated wordpress and changed the theme.
 * Can anyone help me with this?
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [Tony.N](https://wordpress.org/support/users/tonyn-1/)
 * (@tonyn-1)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151191)
 * > “On the back end, when I try to type a product’s name on the products page 
   > of woocommerce, I get nothing found. ”
 *  means, when I try to search a product on the search bar of woocommerce.
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151402)
 * I’m not using woo commerce but I have the same problem with a new update to 4.2.2
   and the post filter and post searching on the admin screens aren’t working.
 * Post searches return an empty result set and post filtering just returns the 
   default result set.
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151405)
 * I found that the Search functionality was related to the Search Everything plugin.
   
   When disabled, post searches worked fine but post filtering still failed to have
   any effect. I reviewed the Search Everything settings and found that it appeared
   that settings just needed updating because after that, searching worked fine.
   Still trying to resolve the filtering.
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151412)
 * I’ve disabled all plugins and still can’t filter by post category.
 *  [lammax](https://wordpress.org/support/users/lammax/)
 * (@lammax)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151469)
 * Same problem for me! No problems on frontend side, but when i try to search a
   product on woocommerce backend, i have no result. In add, after any editing on
   pages, products etc… the backend returns always on the articles list. Very annoying!!
 * My configuration: WP 4.2.2 – WC 2.3.9 – YITH Boemia Theme and these plugins:
 * AfterShip – WooCommerce Tracking
    Anti-spam Notifica Cookie Google XML Sitemaps
   HC Custom WP-Admin URL Easy HTTPS (SSL) Redirection Limit Login Attempts MailChimp
   for WordPress Lite Social Login P3 (Plugin Performance Profiler) Remove query
   strings from static resources Shareaholic SZ – Google TinyMCE Advanced UpdraftPlus–
   Backup/Restore WooCommerce – Store Exporter WooCommerce Payment Fees Lite Woocommerce
   Poor Guys Swiss Knife WooCommerce Product Gift Wrap WP-Optimize WP Smush YITH
   WooCommerce Ajax Navigation YITH WooCommerce Ajax Search YITH Woocommerce Compare
   YITH WooCommerce Mailchimp YITH WooCommerce Wishlist
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151490)
 * So, in the off chance that someone else has a similar situation… here’s what 
   ended up solving this issue for us.
 * We have several categories that should never appear in search results so, we 
   had the following search filter in our custom theme functions file.
 *     ```
       function SearchFilter($query) {
           if ($query->is_search) {
               $query->set('cat','-1572,-1353,-1555,-689');
           }
           return $query;
       }
       add_filter('pre_get_posts','SearchFilter');
       ```
   
 * That worked fine until we upgraded to WP 4.2.2. WP was several versions out of
   date at time of update, so the change may not have been in 4.2.2 but somewhere
   along the line something changed making this filter problematic on the back end.
   So, we added another condition to our if statement
 * `&& !is_admin()`
 * and that solved the problem for us.
 *  [nickoonce](https://wordpress.org/support/users/nickoonce/)
 * (@nickoonce)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151491)
 * Oh, and BTW, we also noticed that for some reason… this filter function changed
   the admin category filter form method from POST to GET. That was our first clue
   to solving this.
 *  [wrip](https://wordpress.org/support/users/wrip/)
 * (@wrip)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151567)
 * [@nickoonce](https://wordpress.org/support/users/nickoonce/), your solution works.
   
   After I added !is_admin() in my SearchFilter() function, it started working.
 * Thanks for sharing!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Filter & Admin Search Don't work’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)

 * 8 replies
 * 4 participants
 * Last reply from: [wrip](https://wordpress.org/support/users/wrip/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/filter-admin-search-dont-work/#post-6151567)
 * Status: not resolved