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 shortcode and display results on different pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • Hugo Fernandez
    #275141

    We would like to use a one form and results shortcode, and embed it to multiple different pages. In addition to that, we need the search results display below the form where the search form is added using ajax.

    Currently, when we submit the form, it redirects to a different page but what we need is just to load the results to the same page where the form is added.

    Trevor Moderator
    #275178

    You could do that by having a dynamic results URL, using this filter:

    https://searchandfilter.com/documentation/action-filter-reference/#modify-urls

    and get_peramlink() you can get 1 filter to work across multiple pages.

    I do not have any code snippets that do that, unfortunately.

    Stefan van den Berg
    #276745

    In case someone else runs into this problem, this works to add the form to multiple pages:

    function my_set_sf_resultsURL( $url, $sfid) {
    $url = get_permalink();
    return $url;

    }
    add_filter( ‘sf_results_url’, ‘my_set_sf_resultsURL’, 10, 2 );

    Ross Moderator
    #276747

    Thanks for sharing Stefan 🙏

    Dan Seddon
    #288372

    Yes, brilliant thank you.

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

The forum ‘Search & Filter Pro’ is closed to new topics and replies.