Forums Forums Search & Filter Pro Infinite Scroll not working

Viewing 10 posts - 1 through 10 (of 15 total)
  • Anonymous
    #152295

    Hello,
    Infinite scroll seems to no longer be working. Here is the code I’m using for the results page which I customized and got the base from results-infinite-scroll.php. I have the file in my child theme in a folder titled “search-filter”. The custom results are showing but infinite scroll is a no go. Please advise. I already deactivated all plugins and even switched my theme over to twenty seventeen to test and infinite scroll does nothing. It was working a few weeks back showing the loader animation and then showing more results. My site is blocked inside a a firewall and cannot share the URL but my code for the results page is below.

    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      http://www.designsandcode.com/
     * @copyright 2015 Designs & Code
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    if ( $query->have_posts() )
    {
    	?>
    	
    	Found <?php echo $query->found_posts; ?> Results<br />
    	<div class='search-filter-results-list'>
    	<?php
    		while ($query->have_posts())
    		{
    			$query->the_post();
    			
    			?>
    			<div class='search-filter-result-item'>
    	<!--MMC - Start custom results code -->
    		<div class="resource-wrap">	
    	<div class="resource-tab">
    	<?php $terms = get_the_terms( $post->ID , ( 'resource_type' ) );
    // init counter
    $i = 1;
    foreach ( $terms as $term ) {
        $term_link = get_term_link( $term, ( 'resource_type' ) );
            if( is_wp_error( $term_link ) )
            continue;
            echo '<a>slug . '" href="' . $term_link . '">' . $term->name . '</a>';
            //  Add comma (except after the last theme)
            echo ($i < count($terms))? ", " : "";
            // Increment counter
            $i++;
    }
    ?>
    	</div>
    			<div class="clr"></div>
    			<a>"><?php 
    				if ( has_post_thumbnail() ) {
    					echo '<div class="resource-photo">';
    					the_post_thumbnail("small");
    					echo '</div>';
    				}
    				?></a>
    <div class="resource-content">
    	<ul class="meta clr meta-with-title">
    	<li><?php echo get_the_date(); ?></li>
    		<!--<li><?php /*$terms = get_the_terms( $post->ID , ( 'resource_author' ) );
    // init counter
    $i = 1;
    foreach ( $terms as $term ) {
        $term_link = get_term_link( $term, ( 'resource_author' ) );
            if( is_wp_error( $term_link ) )
            continue;
            echo '<a href="' . $term_link . '">'. '<span class="fa fa-user" aria-hidden="true"></span>' .' ' . $term->name . '</a>';
            //  Add comma (except after the last theme)
            echo ($i < count($terms))? ", " : "";
            // Increment counter
            $i++;
    }*/
    ?></li>-->
    		<li><span class="fa fa-folder-o" aria-hidden="true"></span> <?php $terms = get_the_terms( $post->ID , ( 'categories' ) );
    // init counter
    $i = 1;
    foreach ( $terms as $term ) {
        $term_link = get_term_link( $term, ( 'categories' ) );
            if( is_wp_error( $term_link ) )
            continue;
            echo '<a href="' . $term_link . '">' . $term->name . '</a>';
            //  Add comma (except after the last theme)
            echo ($i < count($terms))? ", " : "";
            // Increment counter
            $i++;
    }
    ?></li>
    	</ul>
    			<h3><a>"><?php the_title(); ?></a></h3>
    			<?php the_excerpt(); ?>
    	<div class="filtered-results-meta">
    	<p><strong>Roles:</strong> <?php $terms = get_the_terms( $post->ID , ( 'role' ) );
    // init counter
    $i = 1;
    foreach ( $terms as $term ) {
        $term_link = get_term_link( $term, ( 'role' ) );
            if( is_wp_error( $term_link ) )
            continue;
            echo '<a href="' . $term_link . '">' . $term->name . '</a>';
            //  Add comma (except after the last theme)
            echo ($i < count($terms))? ", " : "";
            // Increment counter
            $i++;
    }
    ?></p>	
    	</div>
    	</div>
    </div>
    <!-- MMC - End code -->
    				<hr />
    			</div>
    			
    			<?php
    		}
    	?>
    	</div>
    <?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    Trevor
    #152308

    That is the contents of the file in the search-filter sub-folder of your child theme? What name does that file have? It should be results.php

    Anonymous
    #152310

    Yes the file is named results.php. The custom results show fine. Its the infinite scroll that no longer is working. Even when it was working it would be random. Like not work when I was logged into wordpress but it would work when I was viewing the site while logged off. Also sometimes I had to interact with the dropdown filters before infinite scroll would start to work. Now its not working at all.

    Trevor
    #152332
    This reply has been marked as private.
    Anonymous
    #152641
    This reply has been marked as private.
    Trevor
    #152647
    This reply has been marked as private.
    Anonymous
    #152699
    This reply has been marked as private.
    Trevor
    #152702
    This reply has been marked as private.
    Anonymous
    #152710

    Ok Perfect. I am using WordPress 4.9.1. Could that be why things are not working properly or is your plugin compatible with the latest wordpress?

    Trevor
    #152714

    Our plugin is compatible with 4.9.x. We will speak tomorrow?

Viewing 10 posts - 1 through 10 (of 15 total)