Forums Forums Search & Filter Pro How to show results with Ajax

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #221617

    I’ve also tried adding in the search filter ID into the query:

                $args = array(
                  'post_type'   => 'partner',
                  'post_status' => 'publish',
                 );
                $args['search_filter_id'] = 6688;
                $partners = new WP_Query( $args );

    Which I saw on this page: https://searchandfilter.com/documentation/search-results/custom/

    Do I need to somehow include the taxonomies into the query? I have three custom ones at the moment.

    Trevor
    #221670
    This reply has been marked as private.
    Anonymous
    #221737
    This reply has been marked as private.
    Trevor
    #221822

    I have switched OFF Ajax and it seems to work for me. Looking at your code, change the <ul> to add a class, like this:

    <ul class="search-results">

    and the change the Ajax Container from #main to .search-results

    Then switch Ajax back on and test. Please let me know how you get on?

    Anonymous
    #221847

    Hi Trevor,

    I did as you asked, and now when selecting different options on the front end it appears to load something but the results don’t actually change.

    Trevor
    #221879

    The results <ul> does not have the class added?

    https://www.screencast.com/t/Bj6iuivS7EQ

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