Forums Forums Search & Filter Pro Filters not working without search?

Tagged: , ,

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #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

    Anonymous
    #11779

    Sorry, by the way I forgot to mention I am using wordpress 4.1

    Ross Moderator
    #11786

    Hey 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
    #11802

    Hi 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
    #11806

    Hi 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

    Anonymous
    #11808
    This reply has been marked as private.
    Ross Moderator
    #11809
    This reply has been marked as private.
    Anonymous
    #11819
    This reply has been marked as private.
    Ross Moderator
    #12325
    This reply has been marked as private.
    Ross Moderator
    #12396

    This seems like its working…!

Viewing 10 posts - 1 through 10 (of 11 total)