Forums › Forums › Search & Filter Pro › Category count zero (0) and no results
- This topic has 10 replies, 3 voices, and was last updated 9 years, 4 months ago by
Ross.
-
Anonymous(Private) November 20, 2015 at 4:39 am #30280
Category pages in wordpress confirm that posts are categorized. If I select no categories on the search form then these also show up in the results. But the count always reads zero for the category and selecting the category results in ‘no results’.
I have tried clearing the cache, deactivating/reactivating the plugin, making a new search form on a new page, etc. Please help!!Anonymous(Private) November 20, 2015 at 4:40 am #30281FWIW, you can view the page here: http://txcampaign.org/search-our-resources/
Ross Moderator(Private) November 20, 2015 at 5:05 pm #30326Hi Gwen
It sounds like you might have some conflicting settings.
Can you check the tabs “Tags, Categories & Taxonomies” and the tab “Post Meta”?
Do you have any settings in there?
Thanks
Anonymous(Private) November 20, 2015 at 5:19 pm #30329Hi Ross,
Thanks for the reply. Post-Meta is empty. The tags, Categories section has an exclude set at present on some categories but the problem persists with or without. Have also tried doing it as in explicit include (with select all) but no luck.
Screenshot: https://www.dropbox.com/s/uee85eku1cumg8r/Screenshot%202015-11-20%2011.16.00.png?dl=0
If it helps, I know PHP pretty well (barely anything at all about WordPress, am a Drupal dev) but I;’m comfortable reading code if you think there may be something worth checking into.
The site is not customized as far as I am aware (no guarantees) and I’ve tried disabling all other plugins on my local to rule out a conflict.
Previously, the site had the free version of your plugin installed, so not sure if there is some DB cruft I should be on the lookout for. I have tried deactivating and reactivating the pro version to see if I could trigger a fresh reinstall, but as my search form persisted I can’t say this cleans everything.
Ross Moderator(Private) November 20, 2015 at 5:29 pm #30331Hi Gwen
I wanted you to simply remove all settings from those tabs, so no includes or excludes whatsover – all fields must be empty.
And in the post meta tab, if there is even one entry in there, it should be removed.
RE S&F free, S&F free actually doesn’t store a single thing in the database so no worries here – just make sure free is disabled, and pro is enabled of course.
If you’ve done all that and still getting nowhere then I would start looking at the fact that you have 5 things there called “Category” – you could be using the wrong field, either in your search form or in include/exclude area.
As an FYI, wordpress only has 1 true “category”. Anything else in that list called “category” must be a custom taxonomy – but renamed to “category” – which makes it all confusing.
If you are not already, instead of using a category field, use a taxonomy field instead.
Thanks
Anonymous(Private) November 20, 2015 at 8:52 pm #30341Thanks Ross, I have a solution.
For anyone who finds this thread, I think the key to my issue was in the naming conventions around categories. Even though I was using the right one for my needs, the fact that there were multiple using the same label seems to have caused the issue. I haven’t dug into code yet to see how it loops through, but my guess is that it was using the name to grab one of the others (which were all empty) so giving the appearance of a zero result.
I created a custom post type and a custom taxonomy (each with more distinct names) and all is working well now.
Ross Moderator(Private) November 20, 2015 at 10:43 pm #30342Thanks for the update.
S&F actually uses the category name – which should be unique anyway for any custom taxonomy, however you may have hit a potential conflict somewhere in the code.
By any chance would you be able to provide the objects your were using to create your taxonomies?
If there is a bug I want to get it fixed rather than dong a work around 🙂
Thanks!
Ross Moderator(Private) November 25, 2015 at 3:43 pm #30741Hey Gwen
Thanks for the offer – but rather than digging around some themes code I’m going to do some testing from my side.
I’ve already made a couple of tweaks which should help distinguish the taxonomies from categories.
Lets see if it pops up again!
Thanks!
-
AuthorPosts