Function that returns the SFID

Forums › Forums › Search & Filter Pro › Function that returns the SFID

Tagged: ,

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #207173

    Hi,

    I’m looking for a function that returns the sfids used on my post archive. I have more than one S&F form (one in the header and two in my archive template) and I want to know their id’s

    On my localhost this works, but just returns one id.
    $sfid = $wp_query->query_vars[‘sfid’];

    Any help will be appreciated!

    Anonymous
    #207174

    PS Maybe important. Loading the S&F forms in via dynamic_sidebar()

    Trevor
    #207178

    That is the only way to fetch the ID of the active form (one that has received filter rules and applied them to the archive). Using more than one S&F form on a page where the results are will not work. On V3, this may become possible.

    Anonymous
    #207188

    Ok thank you Trevor!
    As a workaround I will pass the id’s to the archive template via an acf field.
    Kind regard, Timon

Viewing 4 posts – 1 through 4 (of 4 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.