[wp-hackers] get_posts problem...

Mr. Awesome theone.andonly.mr.awesome at gmail.com
Wed Mar 5 03:54:57 GMT 2008

I even removed that

$posts = get_posts('numberposts=10&offset=0');
foreach ($posts as $post) : ?>

code from the header.php file, and put it in the sidebar.php file.. and 
I still get a normal post on the Author page, and not the actual Author 
content material... Grrr.. I know why though.. cause the sidebar "call" 
is BEFORE the index page loop stuff.. so it's basically still AHEAD of 
the "loop" which is still letting it happen...

<?php get_header(); ?>

<div id="contentwrap" class="clearfix">
    <?php get_sidebar(); ?>
    <div id="left">
        <h3 class="pen">content articles</h3>
        <small>Integer id metus eget ligula commodo dictum.</small>
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

Hmm, maybe if I relocate where the sidebar "call" code is, like.. after 
the "loop" before the "get_footer" it will be ok... Hmmm.. But there 
still should be some type of "work-around/ fix" for this though... sigh.

More information about the wp-hackers mailing list