WordPress.org

Support

Support » How-To and Troubleshooting » Display all posts?

Display all posts?

  • mikedistras
    Member

    @mikedistras

    One of my clients has upgraded his hosting from Paid Shared hosting to a VPS.

    After the upgrade we are seeing errors scattered around the site.

    One being that our “Updates” page, which simply displayed ALL the posts on the site, is one of the main ones we need to fix.

    The code used to display all the posts was:

    <?php query_posts('posts_per_page=-1');  ?>
    <?php while ( have_posts() ) : the_post() ?>
    <div id="post-<?php the_ID() ?>" class="post model_grid">
    
    				<a href="<?php the_permalink() ?>">
    					<?php if ( has_post_thumbnail() ) { the_post_thumbnail(  ); } ?>
    				</a>
    
    				<div class="model_name">
    					<?php the_title(); ?>
    				</div>
    
    			</div>
    
    <?php endwhile ?>

    Any help appreciated!

    Thanks

  • The topic ‘Display all posts?’ is closed to new replies.