[wp-trac] [WordPress Trac] #2822: show_on_front kills
 post_type=post queries on home page
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Wed Jun 14 04:14:34 GMT 2006
    
    
  
#2822: show_on_front kills post_type=post queries on home page
----------------------+-----------------------------------------------------
       Id:  2822      |      Status:  new                     
Component:  General   |    Modified:  Wed Jun 14 04:14:34 2006
 Severity:  normal    |   Milestone:  2.1                     
 Priority:  normal    |     Version:  2.1                     
    Owner:  skeltoac  |    Reporter:  skeltoac                
----------------------+-----------------------------------------------------
 This came up when people tried using the Recent Posts widget on their
 blogs when show_on_front is set to 'page'. If it's safe to assume special
 queries like that will provide query args, the attached patch fixes it.
 For example, this code is broken before and fixed after the patch:
 {{{
 <?php $r = new WP_Query('showposts=10'); ?>
 <?php if ( $r->have_posts() ) : while ( $r->have_posts() ) :
 $r->the_post(); ?>
 /* Loop stuff */
 <?php endwhile; endif; ?>
 }}}
-- 
Ticket URL: <http://trac.wordpress.org/ticket/2822>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list