Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Search Page Doesnt Refresh with Updated Filters

Viewing 7 posts - 1 through 7 (of 7 total)
  • Joe Gabriele
    #264579

    Hello,

    My initial search via Categories and Tags provides the correct results. However, when I update the filters to something new and hit Submit, nothing happens. The address bar updates with the new filters and if I hit enter or refresh, the page then displays the correct results. Therefore, it appears something happens to my Submit button after my initial search results are displayed. I even tried the Auto Submit option and that doesnt work either.

    I am currently using the theme Pluto and my Display Results option is set to “As an Archive” as using Shortcode and Template just displays everything and not any filtered results. I also tried using Custom Template and chose index.php as well as search.php and nothing changed.

    I also looked into updating my search.php file to search-filter.php with deleting a line of code, but that didnt work either. I pasted a copy of my original search.php file below.

    Any help would be much appreciated!

    <?php
    /**
    * The template for displaying Search Results pages
    *
    * @package WordPress
    * @since Pluto 1.0
    */

    get_header(); ?>

    <div class=”main-content-w”>
    <div class=”main-content-m”>
    <?php os_the_primary_sidebar(‘left’); ?>
    <div class=”main-content-i”>
    <?php
    if ( have_posts() ) : ?>

    <header class=”search-results-header”>
    <h3><?php printf( __( ‘Search Results for: %s’, ‘pluto’ ), get_search_query() ); ?></h3>
    </header><!– .page-header –>
    <?php osetin_show_filter_bar(‘option’); ?>
    <?php require_once(get_template_directory() . ‘/inc/set-layout-vars.php’) ?>
    <div class=”content side-padded-content”>
    <div class=”index-isotope hidden-on-load <?php echo $isotope_class; ?>” data-layout-mode=”<?php echo $layout_mode; ?>”>
    <?php
    $os_current_box_counter = 1; $os_ad_block_counter = 0;
    // Start the Loop.
    while ( have_posts() ) : the_post();

    /*
    * Include the post format-specific template for the content. If you want to
    * use this in a child theme, then include a file called called content-___.php
    * (where ___ is the post format) and that will be used instead.
    */
    get_template_part( $template_part, get_post_format() );

    os_ad_between_posts();

    endwhile; ?>
    </div>
    <?php require_once(get_template_directory() . ‘/inc/isotope-navigation.php’) ?>
    </div>
    <?php

    else :
    // If no content, include the “No posts found” template.
    get_template_part( ‘content’, ‘none’ );

    endif; ?>
    </div>
    <?php os_the_primary_sidebar(‘right’); ?>
    </div>
    <?php os_footer(); ?>
    </div>

    <?php
    get_footer();

    Trevor Moderator
    #264640

    This will be related to Ajax. The Ajax container may well require to be different (to the default #main), and if you want me to advise on that, are you able to send me a live link/URL to your search page so I can take a look?

    Also, from the code you posted, I can see that Masonry (Isotope) is being applied. If you have more than one column, it might be necessary to re-apply masonry to the posts after the Ajax results refresh, which, unless you know how your theme is doing that on page load, will be quite difficult. We have the trigger JavaScript for when to do it, but the actual code that goes in to that will be what you would need to discover.

    Switching Ajax off in the form overcomes these issues of course.

    Joe Gabriele
    #264719

    Hi Trevor,

    My live search results url is https://journeyer.io/search-results/.

    Let me play around with the Ajax settings in the S&F Settings.

    Thanks!

    Joe Gabriele
    #264721

    Ok, I switched off Ajax under the Display Results (Load results using Ajax?) and it worked!

    Any negatives with turning it off? At the moment I dont see anything wrong visually.

    Trevor Moderator
    #264730

    The only negative is it makes searching slightly slower as the page has to reload, whereas Ajax only reloads the results part of the page.

    Joe Gabriele
    #264734

    Ok great. Ill use this for now! Thanks for the help!

    Trevor Moderator
    #264737

    Thanks for letting me know. I will close this thread for now.

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

The topic ‘Search Page Doesnt Refresh with Updated Filters’ is closed to new replies.