Forums Forums Search & Filter Pro Template/shortcode

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #44347

    I have some kind of a template/shortcode problem. Please visit fitnesskeuze.nl. There I made a custom post type ‘sportscholen’, and I am using ACF for some fields. I know (thanks to your support), I have to use Relevanssi to index the fields and that is working.

    I have an archive page ‘archive-sportscholen.php’. There I want to show the whole collection and search/filter the results on the same page, so not a ‘fall-back’ to index.php. That happended yesterday after playing with the many display options. Now I am on the same, but nu results.

    I used the shortcode on that specific archive page with the template ‘Sportschool’. It shows (as you can see) two ‘records (there is nothing more yet). And in the sidebar the searchform. However any search ‘task’ does not do anything here….. Could you help me one step further?

    Kind Regards,
    Peter Luit

    Anonymous
    #44349
    This reply has been marked as private.
    Trevor
    #44384
    This reply has been marked as private.
    Anonymous
    #44595

    Hi Trevor,

    Could you have Ross have a look at this, maybe wednesday?

    Thanks in advance, kind regards,

    Peter

    Ross Moderator
    #44919

    Hey Peter

    I took a look.

    Ok, I am having a hard time figuring out exactly what you are trying to achieve – this is my understanding…

    So, you have a search page:

    http://fitnesskeuze.nl/overzicht/

    But the results do not update?

    From what I can see, this is a regular page, with the ID 93…

    You have set “display results” method to “shortcode”, but you do not use the results shortcode anywhere (should be something like [searchandfilter id="123" show="results"])..

    Looking at your template code, it looks like perhaps you do not need the shortcode method, instead you would like to integrate S&F with your custom query –

    // doe een query op posttype schilderij, aantal 10 en aflopend
    $loop = new WP_Query( array( 'post_type' => 'sportscholen', 'posts_per_page' =>$berichtenoppagina, 'order' => $sorteervolgorde));

    ?

    In this case, all you need to do is add search_filter_id with the value of your search form – 119

    So the code would be:

    // doe een query op posttype schilderij, aantal 10 en aflopend
    $loop = new WP_Query( array( 'search_filter_id' => 119 ) );

    You do not need any of the other parameters, because S&F will overwrite these from the settings inside the search form.

    PS, change the display results method to “custom” as you are no longer using the shortcode method.

    Thanks

    Anonymous
    #45054

    Hi Ross,

    Thanks. It seems to be working. I will add some more searchfields and then test the total solution. But this brought me one step further. Sorry for the late reply…..

    Kind Regards,

    Peter

    Anonymous
    #45073

    Hi Ross,

    I use a repeating field ‘lessons’ in Advanced Custom Fields Pro. Under this field I use two subfields: ‘name of lesson’ and ‘discription of lesson’. I don’t know hoe many subfields will be used in each record…..

    I would like to search on the ‘name of lesson’. So I want a list of all filled in lessons to be displayed as possible search arguments. Looking in ‘postmeta’ I can select any of the used subfields, but only as a fixed field with index. so, ‘name of lesson 1′, ”name of lesson 2’ etc. Is there a way to choose ‘name of lesson’ and that I get all results?

    Peter

    Ross Moderator
    #45233

    Hey Peter

    We don’t actually support repeater fields – its something I’m looking into – but as of yet, not attempted to add to S&F.

    From our product page re ACF:

    Essentially, if you are using any of the Basic fields (not text area) or Choice fields then you can filter these in Search & Filter Pro.

    In addition to that, although undocumented, we do in fact support relationship fields thanks to some code provided by one of our users.

    Thanks

Viewing 8 posts - 1 through 8 (of 8 total)