WordPress.org

Ready to get started?Download WordPress

Forums

Method on Codec Doesn't work Well (1 post)

  1. silverkid14
    Member
    Posted 7 years ago #

    I took the first method:
    http://codex.wordpress.org/Template_Tags/get_posts

    And integrated it into, my blog. As you can see it gets the post titles correct.

    For some reason, the content is the same on both!

    Here is my code:

    <?php
    	$myposts = get_posts('numberposts=3&offset=2');
    	foreach($myposts as $post) :
    	?>
    	<div class="r-post">
    		<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    		<?php
    		the_excerpt('Read More...'); // the
    		?>
    	</div>
    	<?php endforeach; ?>

    Am I doing something wrong?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags