﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
22031,Conditional tags don't work within add_feed() callback function,sanchothefat,,"I was putting together a custom feed and wanted to pick a different template based on the context of where I was in the site. So for example I wanted one feed template on the home/front page and another for category pages.

Using `add_feed()` and browsing to that feed results in only `is_feed()` being true and not any of the other conditional tags.

I was wondering if a) there's a reason for that and b) if it's something we could fix.

I'm not entirely sure where to look though. Attempts at running `$wp_query->parse_query_vars()` to force the conditionals to be set were unsuccessful.

The following code is a quick demo:

{{{
add_feed( 'new_feed', 'feed_output' );

function feed_output() {
    if ( is_home() )
        echo 'home feed';
    if ( is_singular() )
        echo 'singular feed';
    if ( is_category() )
        echo 'category feed';
}
}}}

Nothing will be output on /feed/new_feed/ URLs even if on home, single or category page.",enhancement,closed,normal,,Feeds,,normal,duplicate,,robert@…
