Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How do I limit the number of posts displayed on a page?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #205379
    rouviere
    Participant

    I am sure this very simple, but I have not found a ready solution on WordPress or StackOverflow. I am hoping someone here can assist.

    I have a simple query_posts on a page in WP. I just need to be able to limit the number of posts returned to a specific number. How would I add that code to the following?

    <?php query_posts(‘cat=2’); ?>
    <?php while (have_posts()) : the_post(); ?>
    pablo“>
    <h3><?php the_title(); ?></h3>

    <?php the_field(‘event_dates’); ?>

    &lt;p&gt;&lt;?php the_field('event_snippet'); ?&gt;&lt;/p&gt;

    <?php endwhile;?>

    #205389
    shaneisme
    Participant
    #205390
    rouviere
    Participant

    Thanks.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.