[wp-trac] [WordPress Trac] #14300: shortcodes aren't being substituted when query_posts is used to specify the category

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 13 20:38:50 UTC 2010


#14300: shortcodes aren't being substituted when query_posts is used to specify the
category
--------------------------+-------------------------------------------------
 Reporter:  mirmillo      |       Owner:                         
     Type:  defect (bug)  |      Status:  new                    
 Priority:  normal        |   Milestone:  Awaiting Review        
Component:  Shortcodes    |     Version:  3.0                    
 Severity:  normal        |    Keywords:  shortcodes, query_posts
--------------------------+-------------------------------------------------

Comment(by mirmillo):

 Here's a better example.

 1. Make a post with a shortcode and put it in the uncategorized category.
 2. Change index.php loop to look like:

 {{{
 query_posts(array('category__in' => array(1)));
 get_template_part( 'loop', 'index' );

 query_posts(array('category__not_in' => array(2)));
 get_template_part( 'loop', 'index' );
 }}}

 3. View the index page.  You'll see the same post twice, only the second
 one has the shortcode substitution.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14300#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list