Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The wonderful answer here helped me create a custom RSS feed, and that's one major part done.

I know that there's the is_feed conditional tag to show content only if it's a feed. But is there a conditional tag to show content only in my custom feed? If not, is there any other way to do it? (PS: I want to change the output of Wordpress' built-in gallery in my custom feed.)

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Okay, that was quite easy. So, if your custom feed URL (non-pretty) is http://example.com/?feed=wpse63760_custom_feed, then the conditional tag would be used as such:

if ( is_feed( $feeds = 'wpse63760_custom_feed' ) ) {
   // So what's the conditional content?
} else {
   // This is shown everywhere else
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.