Forums Forums Search & Filter Pro Pagination or Infinite Scroll

Viewing 10 posts - 1 through 10 (of 13 total)
  • Anonymous
    #212404

    I am trying to get the infinite scroll working but I can’t even get the list to paginate. I kind of got a loading symbol to appear but no other content loads in. How do I get the infinite scroll to work?

    Trevor
    #212408
    This reply has been marked as private.
    Anonymous
    #212422
    This reply has been marked as private.
    Trevor
    #212464
    This reply has been marked as private.
    Anonymous
    #212473
    This reply has been marked as private.
    Trevor
    #212481

    If you switch off Infinite Scroll, does your page then have pagination?

    Anonymous
    #212487

    No I don’t get any pagination at all when turned off.

    Trevor
    #212491

    mmm

    Not sure if it is needed or not. The ‘standard’ PHP/HTML structure for Infinite Scroll looks like this:

    <div class='name_of_ajax_container_class'
    if ( $query->have_posts() )
    {
    	?>
    	<div class='name_of_infinite_scroll_container_class'>
    	<?php
    		while ($query->have_posts())
    		{
    			$query->the_post();
    			
    			?>
    			<div class='name_of_infinite_scroll_post_selector_class'>
    				// post output here
    			</div>
    			
    			<?php
    		}
    	?>
    	</div>
    <?php
    }
    else
    {
    	?>
    	<div class='name_of_infinite_scroll_container_class' data-search-filter-action='infinite-scroll-end'>
    		<span>End of Results</span>
    	</div>
    	<?php
    }
    </div>

    How does your template compare to that in structure?

    Anonymous
    #212591

    Hello,
    I am not 100% sure how to add this code to the template. I can see some of the structure is the same. If its easier could I just add regular pagination?

    Trevor
    #212726
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 13 total)