[wp-hackers] get_posts problem...

spencerp theone.andonly.mr.awesome at gmail.com
Wed Mar 5 01:13:47 GMT 2008


Maybe someone on here can help, well, hopefully. I'm on TRUNK 2.5 of 
course, and I have a theme where I'm using this code ABOVE the actual 
index.php loop stuff...

<div style="float: left; width: 30%; padding-top:15px; 
padding-left:15px;" class="footitems">
 <h4>latest<span class="altcolor"> posts</span></h4>
<?php
$posts = get_posts('numberposts=10&offset=0');
foreach ($posts as $post) : ?>
<li>
<ul>
<li><a href="<?php the_permalink(); ?>" title="<?php the_title() 
?>"><?php the_title() ?></a></li>
</ul>
</li>
<?php endforeach; ?>
 </div>

Now, it shows the Latest post titles in that section like supposed too, 
but when on the AUTHOR PAGE, it shows a POST and not THAT specific 
PAGE'S content. Is there a work around for this maybe? Jeremy Visser and 
I had tried this too...

<?php $latest_posts = get_posts('numberposts=3&offset=0');
foreach ($latest_posts as $latest_post) : ?>

It shows the AUTHOR page content, but in the top section it's showing 
three links "The Authors" which links to the actual "The Authors" page. 
It's not showing the latest posts titles... Anyone with a suggestion?




More information about the wp-hackers mailing list