Reputation: 662
I am using Wordpress and the Roots Template. I have created an archive page to show member profiles. - its just index.php saved out as archive-members.php so it gets the member posts, but I don't know how to change the number it displays. I want it to display all. its not using any custom post type query, its just an archive of this post-type slug
Here is my page code.
<div class="purple row">
<div class="container">
<div class="col-lg-12">
<?php get_template_part('templates/page', 'header'); ?>
</div>
</div>
</div>
<?php if (!have_posts()) : ?>
<div class="alert alert-warning">
<?php _e('Sorry, no results were found.', 'roots'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<div class="row pagecontent">
<div class="container">
<?php while (have_posts()) : the_post(); ?>
<div class="col-sm-3">
<?php get_template_part('templates/members', get_post_format()); ?>
</div>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages > 1) : ?>
</div>
</div>
<div class="container">
<div class="col-lg-12">
<nav class="post-nav">
<ul class="pager">
<li class="next"><?php next_posts_link(__('Next Page →', 'roots')); ?></li>
<li class="previous"><?php previous_posts_link(__('← Previous Page', 'roots')); ?></li>
</ul>
</nav>
</div>
</div>
<?php endif; ?>
Upvotes: 0
Views: 1795
Reputation: 449
I believe this question has already been answered here.
The answer in that thread links to the WordPress codex on using the query_post() function.
That, or as someone else in the thread states, you can try changing the settings in the admin interface (settings -> reading). There, you'll see a box that allows you to change how many posts are displayed on a page.
Upvotes: 1