• I used the following code:

    <?php
    $args = array( 'numberposts' => -1 );
    $lastposts = get_posts( $args );
    foreach($lastposts as $post) : setup_postdata($post); ?>
    	<h2><a>"><?php the_title(); ?></a></h2>
    	<?php the_content(); ?>
    <?php endforeach; ?>

    [Please post code or markup snippets between backticks or use the code button.]

    I do want to list all posts, however I only want to show 10 posts per page. It is listing all the posts on one page even though I have it set in the dashboard for 10 posts. Any help would be appreciated.

    Thanks,
    Todd

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘need get posts() to only list 10 per page’ is closed to new replies.