[wp-hackers] get_posts problem...

spencerp theone.andonly.mr.awesome at gmail.com
Wed Mar 5 02:17:33 GMT 2008


Sorry forgot, we tried ANOTHER method as well...

Method 3:

<h4> latest <span class="altcolor">posts</span></h4>
<?php $latest_posts = get_posts('numberposts=3&offset=0');
foreach ($latest_posts as $latest_post) : ?>
<li>
<ul>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title(); 
?>"><?php the_title(); ?></a></li>
</ul>
</li>
<?php endforeach; ?>

Result: It showed the Author Page content just fine, however, it showed 
the "The Authors" page links THREE times in the above section where the 
actual Latest Posts titles are supposed to be at. Basically it showed 
the page's links 3 times instead of latest three post's titles...


More information about the wp-hackers mailing list