• I am trying to display a list of all of my recent 100 posts. Showing only the title and link to the post.

    Here is my code. There are no other loops on the page.

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    			 <?php
    			 $lastposts = get_posts('numberposts=100&amp;order=ASC&amp;orderby=title');
     			foreach($lastposts as $post) :
        		setup_postdata($post);
    			 ?>
     			<h2><a href="<?php the_permalink(); ?>" <?php the_title(); ?></a></h2>
     			<?php endforeach; ?>
                             <?php endwhile; else: ?>
    <?php endif; ?>

    It doesn’t appear to be working! I would appreciate any help!

    Thanks,

    Jon

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Help with the loop!’ is closed to new replies.