Support » Plugin: Ajax Pagination and Infinite Scroll » Load More Button: Calling but not loading more Posts

  • Resolved DerHerrMeier

    (@derherrmeier)


    Hi and thanks for the nice plugin.

    I have a similar problem like @james-taylor-1 couple month ago, but the solution didn’t work for me.

    I think I have set it up correctly with the selectors:
    Posts Selector: .blogposts
    Post Selector: .post-box
    Navigation Selector: .navigation
    Next Selector: .nav-next a

    It used to work all right, but suddenly stopped loading more posts. The load more button is being generated in place of the standard pagination links, the icon spins when clicked but nothing is loaded anymore.

    Link: http://www.christian-thiele.com/#blog

    Code of the loop (relevant part):

    <?php
    	$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    	$args = array(
    		'post_type' 	=> 'post',
    		'showposts' 	=> 3,
    		'paged' 		=> $paged
    	);
    	$the_query = new WP_Query( $args );
    	// The Loop
    	if ( $the_query->have_posts() ) :
    		echo '<div class="content-section" id="blog"><div class="content-column clearfix">';
    		echo '<div class="blogposts">';
    		while ( $the_query->have_posts() ) : $the_query->the_post();
    				echo '<div class="post-box">';
    				//echo '<p class="roofline">Blog  .  ';
    				  //foreach((get_the_category()) as $category) : echo '<span class="rl-category">' . $category->cat_name . '</span> '; endforeach;
    				//echo '</p>';
    				echo '<h3 class="postTrigger hl-closed">' . get_the_title() . '</h3>';
    				echo '<div class="ellipsis post-closed"><div>';
    				the_content();
    				echo do_shortcode("[shariff]");
    				echo '</div>';
    				echo '<div class="readmore shown">... Weiterlesen >></div>';
    				echo '</div>';
    				echo '</div>';
    		endwhile;
    		?>
    		<div class="navigation pagination">
    			<div class="nav-previous"> <?php previous_posts_link( 'Newer Entries' ); ?> </div>
    			<div class="nav-next"> <?php next_posts_link( 'Older Entries', $the_query->max_num_pages ); ?> </div>
    		</div>
    

    Thanks in advance for any ideas/help.

    Uli

    • This topic was modified 7 years, 2 months ago by DerHerrMeier.
    • This topic was modified 7 years, 2 months ago by DerHerrMeier.
    • This topic was modified 7 years, 2 months ago by DerHerrMeier.
Viewing 1 replies (of 1 total)
  • Plugin Author craigramsay

    (@malinkymedia)

    Hi, your current site code doesn’t seem to match the above code. However, I’d recommend the following. Replace your pagination code in the template with this.

    // Previous/next page navigation.
    the_posts_pagination( array(
    'prev_text'          => 'Previous page',
    'next_text'          => 'Next page',
    ) );

    And use the following selectors.

    Navigation Selector: .navigation
    Next Selector: .nav-links a.next

    Let me know how you get on. Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Load More Button: Calling but not loading more Posts’ is closed to new replies.