• Hi,

    Does anybody know how to limit the number of posts per page? I was able do it using the Page Builder plugin but there’s no link to show the older posts/newer posts. So I’m trying to figure out how to add pagination. Note that I’m using a child theme of Twenty Thirteen.

    Any help would be appreciated!

    Here’s a snippet of code from my content.php (child theme of Twenty Thirteen)

    <?php twentythirteen_entry_date(); ?>
     <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
     </div>
      	</div>
        </div>
        </div>
    
    	</div><!-- .entry-summary -->
    
    	<?php else : ?>
    	<div class="entry-content">
    		<?php
    			/* translators: %s: Name of current post */
    			the_content( sprintf(
    				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
    				the_title( '<span class="screen-reader-text">', '</span>', false )
    			) );
    
    		   wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
    		?>
    
    	</div><!-- .entry-content -->
    
    	<?php endif; ?>
    
    </article><!-- #post -->

Viewing 2 replies - 1 through 2 (of 2 total)
  • Why don’t you just go to Settings → Reading and change Blog pages show at most to whatever number you want?

    Thread Starter phoenix360

    (@phoenix360)

    Thanks CrouchingBruin,

    I didn’t know that you can change it from there. I’m a newbie. It works when I set it to display the latest posts. I’m using Page Builder and when I set it to static page for my front page, there’s no pagination. I’m using Page Builder because it makes it easier to divide up my page since I don’t know CSS/PHP too well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘number of posts per page’ is closed to new replies.