Forums › Forums › Search & Filter Pro › Filters not working without search?
- This topic has 10 replies, 2 voices, and was last updated 9 years, 9 months ago by Anonymous.
-
Anonymous(Private) February 11, 2015 at 3:51 pm #11778
Hi
Been struggling for the last couple of hours and would really appreciate some help.
I have followed the guidelines for using an archive/custom template and everything works fine (with and without AJAX) until I try to use any filter without entering a search term? I am using the Hueman theme and EDD and really need the filters to work without needing to enter a search. The theme uses what I believe is a standard loop so I am a bit baffled. When I just select just a filter, my home.php is returned into the #content, if I use a search term with a filter it works as I expect?
This is the code for my search-filter.php. I have deliberately stripped it down and made it as simple as possible to prevent any errors with the loop.
<?php get_header(); ?> <section class="content"> <div id="content"> <?php get_template_part('inc/page-title'); ?> <div class="pad group"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php get_template_part('content-grid'); ?> <?php endwhile; ?> <?php else : ?> <?php _e('Please try another search:','hueman'); ?> <?php endif; ?> </div><!--/.pad--> </div> </section><!--/.content--> <?php get_sidebar(); ?> <?php get_footer(); ?>
I would very much appreciate any help as I think this plugin will be fantastic if only I could get it to work as I expect!
Thanks
Ross Moderator(Private) February 11, 2015 at 4:49 pm #11786Hey Sarah
I’m not sure what the issue is with your theme but it sounds like you’re nearly there.
If you enter a search term then remove the term from the URL, leaving only
s=
(ie so the search term is blank) do you get results?There is an option under the “advanced” tab, which forces
is_search
to be true, which will help with some themes!I hope this does the trick for you
Thanks
Anonymous(Private) February 12, 2015 at 8:44 am #11802Hi Ross
Thanks for getting back to me.
I would do your test but my links are not being generated like your have specified, in fact they do not change at all even though I have set is_search, and a slug and made the url bookmarkable.
I did some troubleshooting and I am pretty sure it is not my site. I tried disabling most of the plugins I could without affecting the site and removed my ajax page refresh code just to be sure they was no conflict between my ajax stuff & yours but the problem remained.
I can give you access if you would like. I have tried endless combinations in the settings for the search and nothing seems to make it work.
I think this is a superb plugin but I really need it to work obviously 😉
Looking forward to your response.
Ross Moderator(Private) February 12, 2015 at 11:06 am #11806Hi Sarah
It almost certainly sounds like your template – so if no search term is entered you get no results, but if a there is a search term you do?
Head to the “display results” tab, make sure “use custom template” is ticked, and make sure the filename of the above template is specified.
If, upon saving, the filename then disappears/resets then S&F couldn’t find your template (I am fixing this to show a warning in the next version)…
If none of this works, sure send through the link.
Thanks
-
AuthorPosts