Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Use just for filters on custom post type archive

Viewing 10 posts - 21 through 30 (of 31 total)
  • Trevor Moderator
    #55832

    Not today, sadly Richard. It is a long holiday weekend here in the UK. Whilst I am here (about to pack up), Ross is already gone until Tuesday.

    Richard L McCollam II
    #55834

    Is there any way to get a sort of soft ETA? Needing to relay this to the client since we are really really close to launching.

    I understand just because I spent $20 doesn’t mean you guys work for me or owe me immediate turn around, just trying to get timelines together so I can be clear.

    Trevor Moderator
    #55835

    I have no idea. He has nothing other than this on his plate. We cleared almost everything else yesterday. My guess is it won’t take him long. What is in the dropbox file? How does he use it?

    Richard L McCollam II
    #55836

    It is the WordPress install and the database so you will have an exact copy of what I am working with.

    Trevor Moderator
    #55838

    OK

    Richard L McCollam II
    #56127

    Just checking in on this.

    Ross Moderator
    #56197

    Hey Richard

    Ok so I took a look…

    I noticed a couple of problems you were having so made some modifications to get it working in a basic way…

    First, because you want to show your search results on the recipes (CTP) archive page, then all you have to do is set S&F display method to “post type archive” – https://www.designsandcode.com/documentation/search-filter-pro/search-results/as-a-post-type-archive/

    This means S&F will use the main / global query and modify it according to user selection – this worked great for me.

    Second, there is a major problem in the way the search form is added to your search bar… S&F creates its own search form when you place a shortcode, this means all S&F forms are wrapped in <form>...</form> tags.. in your partial recipe-search.php, you’ve placed the shortcode inside another <form> tag (line 1) – this will never work and is not allowed in html.

    So, you need to place S&F outside of the form tags, or remove the existing ones there if you plan to replace your current search with S&F – I simply moved the S&F shortcode (line 33) to the bottom of the file (recipe-search.php), and although ugly, combined with the above, the search began working as expected…

    Lastly, I noticed in your search form you had a field called “cuisine” – it was using the meta key _cuisine – notice the underscore… ACF adds two meta keys for every custom field, one with an underscore and one without – its the one without you need – so I changed the meta key locally to cuisine and this field started working working 🙂

    Best

    Richard L McCollam II
    #56490

    This gave me exactly what I needed. Thanks so much for your help.

    I have one last question. I want to use ajax on this, but now that I have it working when I get the new results with an ajax call it breaks my isotope grid. Is there a javascript call I can make to rebuild my isotope grid after the ajax call is made?

    Trevor Moderator
    #56518

    Yes, this is shown on the FAQ page:

    https://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/

    You will need this one:

    $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
    	console.log("ajax complete");
    	//so load your lightbox or JS scripts here again
    });

    Is this thread now resolved and can I close it?

    Richard L McCollam II
    #56586

    Yes you can go ahead and close this thread. Thank you guys for your support on this. It turned out to be exactly what I needed.

Viewing 10 posts - 21 through 30 (of 31 total)

The topic ‘Use just for filters on custom post type archive’ is closed to new replies.