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

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 17 14:20:19 UTC 2010


#11053: Conditional Tags should work in feeds as well
----------------------------+-----------------------------------------------
 Reporter:  pampfelimetten  |       Owner:                         
     Type:  enhancement     |      Status:  new                    
 Priority:  normal          |   Milestone:  Future Release         
Component:  Feeds           |     Version:  2.8.5                  
 Severity:  normal          |    Keywords:  conditional tags, feeds
----------------------------+-----------------------------------------------

Comment(by pampfelimetten):

 Ups, small typo, should be:

 {{{
 function xxx_filter_rss()
 {
         $uri= explode("/", $_SERVER['REQUEST_URI']);
         if ($uri[1]=="author") {
                 global $wpdb;
                 $name = $wpdb->get_var("SELECT display_name FROM
 $wpdb->users WHERE user_nicename='".$uri[2]."'");
 query_posts("cat=2,3&meta_key=xxx&meta_value=".$name."&showposts=10");
         } else {
                 query_posts("cat=2,3");
         };

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

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


More information about the wp-trac mailing list