Forums › Forums › Search & Filter Pro › No Results or Can't Exclude Categories or…
Tagged: ajax, Auto Submit, categories
- This topic has 7 replies, 2 voices, and was last updated 10 years, 2 months ago by Ross.
-
Anonymous(Private) August 20, 2014 at 10:27 pm #3812
Hello!
I purchased S&F Pro but am not able to get it to work right. All I want is two drop-down fields–one for categories and one for tags–and the user to be taken to a search results page showing PAGES–not POSTS–attributed to those categories and tags. I used the “Post Tags and Categories For Pages” plugin to assign categories/tags to pages.
So these are the results I get depending on different scenarios:
1) Using the default WordPress theme (Twenty Fourteen) with Ajax turned OFF: It works as it should, except I CAN’T SEEM TO EXCLUDE CATEGORIES. “Uncategorized” pages show up in the results when the dropdowns show “Any” even though I excluded the “uncategorized” ID in S&F.
2) Using the default WordPress theme with Ajax turned ON: Works as it should, but still shows excluded categories AND the “auto submit form” does not work. Results do not change dynamically as I select different categories/tags in the dropdowns–I must hit the Submit button to see results.
3) Using the theme I WANT to use, Avada, with Ajax turned OFF: The result page always comes up empty–no results found. Based on a couple of your other responses on the forum, I’m guessing Avada perhaps uses a different search loop?
4) Using the Avada theme with Ajax turned ON: It works, but as with the default theme, it doesn’t exclude categories and “auto submit form” doesn’t work.
I’ve already spent over a day trying to get this to work. I would be forever grateful if you could tell/show me how to get this going like I need it to–preferably with my Avada theme and Ajax turned off.
Thanks in advance.
Ross Moderator(Private) August 20, 2014 at 11:32 pm #3820Hey Norm
It sounds like we need to get (3) working and then see if you still have a category problem.
This plugin uses the main loop in order to display results – by modifying your main loop.
Therefor, your search results template must use the main loop in order to display results.
Some themes (probably like your current one) sometime add a custom query to your templates – to be honest this is generally not best practise in my opinion anyway.
You need to edit the template that is being used to display the results (I think the default would be “search.php”) and look out for any custom queries in there – normally something like “get_posts”, or “wp_query” or “query_posts” – in most cases you can simply remove the line(s) with this query and the rest should work ok?
There have been a few posts popup recently about the category issue I’ll look further in to this, its possible its a bug created by a recent update.
Thanks
Ross Moderator(Private) August 21, 2014 at 1:06 pm #3851Hahaha! I didn’t even realise 😉 Let me know how you get on anyway.
Anonymous(Private) August 25, 2014 at 1:51 am #3906Just an update, for anyone who cares. Or maybe for anyone using this plugin with Avada down the line.
In the settings, selecting “use custom template” and designating “search.php” as the template does not return results.
Also, NOT selecting “use custom template” returns results, but they’re completely UNFILTERED.
Selecting “use custom template” but NOT entering the name of the template works! I think I figured out that, in this case, it’s using archive.php for the search results by default and leaving the template field blank allows it to do that. Naturally, entering archive.php in the template field works too.
Based on the above, perhaps selecting “use custom template” but leaving the template field blank might be something those experiencing no results, or unfiltered results (even if they’re not using Avada), might try?
Ross Moderator(Private) August 26, 2014 at 1:06 pm #3953Hey Norm apologies its been a bank holiday here in the uk which means no one went to work for the last 3 days, I’ll be going through all the support ticket backlog today and hopefully get some answers a little later on.
Thanks
-
AuthorPosts