Forums › Forums › Search & Filter Pro › Search & Filter Pro not working
Tagged: search
- This topic has 8 replies, 2 voices, and was last updated 9 years, 7 months ago by Ross.
-
Anonymous(Private) April 2, 2015 at 6:28 pm #14439
The filter was working fine the other day, but now it’s not working. Currently using Search & Filter Pro.
Here’s a list of my current files in theme:
category.php
footer.php
functions.php
header.php
home.php
index.php
page-contact-us.php
single.php
style.cssIf you can see, I’ve set the counter on and it shows that there are (x) amount of posts in that category.
By default, this should use index.php, isn’t it? There isn’t a search.php. Have debugged and the results show nothing, just default WordPress Loop ‘else’ message “Nothing Found!”.
Please advise. Have been trying to debug for quite some time now.
You can take a look at my site:
Ross Moderator(Private) April 2, 2015 at 6:41 pm #14442Hi Kyle
The count in brackets is generated by WordPress’ built in count (if you goto the category page for example you’ll see what I mean).
This means when you have hidden settings or are altering the query, this count is not correct.
If it was working before, and not working today, then something must have changed.
I’m thinking that you might have some options set in either the “tags, categories and taxonomies” or “post meta” tabs?
Try clearing these out and see what happens.
FYI – I’m working on a feature for the next update where count will always be correct and relevant to your current search & settings.
Thanks
Anonymous(Private) April 2, 2015 at 6:54 pm #14446Hello Ross,
Hmm. Seems like it may be the categories… however right now it’s returning everything. I have Field Relationships set to ‘OR’ though.
I have this ‘Exclude’ categories list inside the Tags, Categories and Taxonomies list.
However, the posts have multiple categories… so for example each post has Cat A and Cat B as the category, but once I ‘exclude’ Cat B from the display list of checkboxes, it returns nothing because it is defining the post as excluded because it’s in Cat B?
Regards,
KyleRoss Moderator(Private) April 2, 2015 at 6:57 pm #14448Excluding a category means any post that is in that category is excluded – even if it is in other categories – this is hte way WordPress’ own
WP_Query
works when you want to exclude one.Does that make sense?
Ross Moderator(Private) April 2, 2015 at 8:21 pm #14461I’m getting a little confused..
When you add a rule: Exclude categories 1,2,3,4 (for example)
Then what this means is, all posts that have category 1,2,3 or 4 will be excluded, regardless of any selection or options.
Is this what you are experiencing?
Anonymous(Private) April 2, 2015 at 8:30 pm #14463Funny… Somehow after a few hours of trial and error I got it to work. I set the Display Results to archive page, used home.php as custom template (although it was using home.php and not index.php by default, not sure why), and I correctly defined the results class.
Under Tags, Categories and Taxanomies I set it as ‘Include’ for Categories instead of ‘Exclude’, so instead of displaying that long list of categories inside the system I now have 3 categories that I want the user to filter by. Field Relationship for this is set to Default.
Post Meta and Advanced is empty and unchecked.
Also, Search Operator for the Search Form UI was set to OR.
Ah well. Not sure if this information can help in any way but this is probably resolved. 😛
Ross Moderator(Private) April 2, 2015 at 9:54 pm #14477No problem thanks for the updates Kyle.
It very easy to get confused (I’ve done it plenty) when you have to think of several steps of logic & rules combining – glad you got it worked out!
Thanks
-
AuthorPosts