[thelist] Wordpress 2.5 theme error

Jeffrey Barke jeffrey.barke at themechanism.com
Thu Apr 10 09:15:05 CDT 2008


Thanks, Trevor--turns out the Adhesive plugin is broken in WP 2.5. I  
didn't catch it at first, because no errors are thrown and the  
(semi-)correct results are returned per page, but the wonky behavior I  
noticed was due to the way it hooks into the $wp_query object.

Jeffrey

On Apr 9, 2008, at 4:28 PM, trevor wrote:

> 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
>>
>
> -- 
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !

--
Cheers.
Jeffrey Barke
jeffrey.barke at theMechanism.com
Lead Developer, US
theMechanism - New York City
440 9th Avenue, 8th Floor
New York, NY 10001-1631
t: +1 212.404.3150
c: +1 917.941.1232
f: +1 212.404.3228



http://www.theMechanism.com

Subscribe to theMechcast, our monthly Podcast:
http://feeds.feedburner.com/theMechcast

theMechanism - London
3rd Floor
405 The Strand
London E14 9FW
United Kingdom
t: +44 (0)20 7240 4964
f: +44 (0)20 7240 2262

--
The information contained in this Electronic mail message is attorney  
privileged and confidential information intended only for the use of  
the individual or entity named above. Such information also is  
intended to be privileged, confidential, and exempt from disclosure  
under applicable law. If the reader of this message is not the  
intended recipient or the employee or agent responsible to deliver it  
to the intended recipient, you are hereby notified that any  
dissemination, distribution, or copying of this communication is  
strictly prohibited. If you have received this communication in error,  
please notify us immediately by telephone.

Blah, blah, blah...
--





More information about the thelist mailing list