Forums › Forums › Search & Filter Pro › Filter for custom post has stopped working
Tagged: No results, woocommerce
- This topic has 19 replies, 2 voices, and was last updated 4 years, 6 months ago by Trevor.
-
Anonymous(Private) April 20, 2020 at 1:06 pm #240586
Hello
I’ve been using Search and Filter Pro for several years but have a come across an issue on one website that I’ve never had before.
There is a filter set up for a custom post using the ‘Custom’ option, which was working fine. I then added a different filter for WooCommerce products on the same website, which also worked.
However, since adding the filter for the Woocommerce products, the filter for the custom post types are not displaying, but the drop-down categories are showing the correct count within the taxonomy (i.e. not zero). When a category is selected no results are displayed. When I add other content to this filter (e.g. WooCommerce products), this content shows, but still not the custom post type.
I’ve been into the custom posts and re-saved them, but still no luck. The custom post settings haven’t changed. Unfortunately, when I remove the filter WooCommerce products, the custom post filter still doesn’t work.
Any help would be appreciated.
Plugin version: 2.5.0
Thank you!
Anonymous(Private) April 21, 2020 at 8:20 am #240707Hi Trevor – thanks for the response.
If the WooCommerce product filter is disabled the original filter still doesn’t work. Neither can I find pre_get_posts being used. I’m using WooCommerce Memberships, so perhaps that’s the issue, but it’s strange that it’s only just stopped working.
I’ve tried using the recommended Custom code (see below), but still none of the custom post types are displayed:
$args = array(‘post_type’ => ‘resources’);
$args[‘search_filter_id’] = 21588;
$query = new WP_Query($args);I’ve also created a new form to see if that would work, with no success.
Thanks
Anonymous(Private) April 22, 2020 at 12:36 pm #240925Will get the Staging site set up.
Re. your question: the first filter was filtering custom posts so I used the ‘Custom’ option. The second filter I created was for a WooCommerce ‘shop’ page, where I used the ‘WooCommerce Shop’ method. After creating this filter, the one for the custom posts stopped working.
-
AuthorPosts