[thelist] Wordpress 2.5 theme error
trevor
trevor at intospace.ca
Wed Apr 9 15:28:02 CDT 2008
Hi Jeffrey,
There may be a wordpress 2.5 bug where using the "query_posts" function in
a page will throw off subsequent use of conditionals, as you have with
"if( have_posts)..."
Here's a link from wordpress support where the 3rd comment from the
moderator implies that it's an issue,
http://wordpress.org/support/topic/150164 - not much to go on there, but
it might be a start...
Also, I thought to show *all* posts, one would use: posts_per_page=-1
where you have: showposts=-1
maybe both will be the same, but it might be worth a try
Or, maybe just remove the query_posts() function altogether with another if
statement, something like:
<?php
if (have_posts()) : ?>
<ul>
<?php while (have_posts()): the_post(); ?>
<php if( is_author('--your author id--')):?>
Some HTML output here
<?php endif; ?>
<?php endwhile; ?>
</ul>
<?php endif; ?>
hth,
trevor
> Message: 7
> Date: Tue, 8 Apr 2008 16:02:48 -0400
> From: Jeffrey Barke <jeffrey.barke at themechanism.com>
> Subject: [thelist] Wordpress 2.5 theme error
> To: thelist at lists.evolt.org
> Message-ID: <16399C04-78E1-4359-8DBA-06283D6A308D at themechanism.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> Prior to upgrading from WordPress 2.0.9 to 2.5, the following page
> displayed all the posts I've ever written. After the upgrade, it only
> shows five of my posts:
> <http://themechanism.com/blog/author/jeffreybarke/>
>
> This used to work:
> <?php
> query_posts('showposts=-1&author=' . $curauth->ID);
> if (have_posts()) : ?>
> <ul>
> <?php while (have_posts()): the_post(); ?>
> Some HTML output here
> <?php endwhile; ?>
> </ul>
> <?php endif; ?>
>
> The code did not change, but its behavior has. Does anyone know why?
>
> Thanks,
> Jeffrey
>
More information about the thelist
mailing list