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 - 1 through 10 (of 31 total)
  • Richard L McCollam II
    #54723

    I just purchased this plugin yesterday and after some playing around with it I am wondering if what I want to do is possible, or if there is a way to set it up the way it needs to be.

    What I am trying to accomplish has to do with this page – http://potatogoodness.staging.wpengine.com/recipes/. It is an archive page for a custom post type. I want to add filters, from ACF fields, underneath the search form and update the results via ajax.

    Can this be added to my already existing code, or can I duplicate this page through the plugin somehow to achieve this?

    Hoping I can be pointed in the right direction here since I haven’t been able to figure it out so far.

    Trevor Moderator
    #54730

    It probably can be done. What theme is it? It seems to be using masonry?

    Richard L McCollam II
    #54731

    It’s a custom theme I am building. The archive page for recipes does use isotope to get the masonry type feel to it.

    I just need help understanding how to integrate the plugin on this page and get it to affect the results.

    Trevor Moderator
    #54732

    Dos the template feed arguments to the wp_query, like this:

    https://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters

    Richard L McCollam II
    #54733

    it uses the template naming of archive-cpt-name.php so I am not directly passing arguments through wp_query.

    I could just make it a custom page template where I run my own query where I can control the arguments passed through if need be.

    Trevor Moderator
    #54734

    Indeed. At some point the template MUST be using wp_query, else how does it fetch the posts?

    I must admit that, on the one hand I admire the use of hand made templates (and the skill and hard work involved), but I can’t help but think it is a lot of hard work compared to buying a theme or theme framework.

    Richard L McCollam II
    #54741

    I am pretty much wanting to duplicate this functionality (http://potatogoodness.staging.wpengine.com/recipes/), but use the plugin to actually change the search query as oppose to hiding/showing posts with jqeury toggles.

    You can expand advanced search and then select a Cuisine to see the basic filtering happening now.

    Trevor Moderator
    #54742

    Well, given that yuo have hand written this theme, you can add the form using the shortcode in php with a do_shortcode function and then you need a wp_query with the args and one of those can be the S&F form ID.

    Richard L McCollam II
    #54744

    What specific argument is the form ID?

    Trevor Moderator
    #54812

    Like this:

    $args = array(
      'post_type' => 'resources',
      'post_status' => 'publish',
      'posts_per_page' => '10',
      'search_filter_id' => '456'
    );
Viewing 10 posts - 1 through 10 (of 31 total)

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