[wp-trac] [WordPress Trac] #11053: Conditional Tags should work in feeds as well

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 31 14:56:18 UTC 2009


#11053: Conditional Tags should work in feeds as well
----------------------------+-----------------------------------------------
 Reporter:  pampfelimetten  |       Owner:                         
     Type:  enhancement     |      Status:  new                    
 Priority:  normal          |   Milestone:  Unassigned             
Component:  Feeds           |     Version:  2.8.5                  
 Severity:  normal          |    Keywords:  conditional tags, feeds
----------------------------+-----------------------------------------------
 I try to get the following to work:

 {{{
 function xxx_filter_cat()
 {
         if (is_author()) query_posts("cat=4");
         if (is_front_page()) query_posts("cat=2,3");
 }

 add_action('rss2_head', 'xxx_filter_cat');
 }}}

 It should alter the rss2 feed, depending if it should get generated for
 the general homepage, or for a single author.

 But: It doesn't work at all - is_author and all the other is_* functions I
 tried always trigger false. is_feed works, but well, doesn't help me very
 much.

 It would be easy to manipulate the generated feeds if wp would support the
 already built-in conditional tags in the feeds as well.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11053>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list