0

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.)

0

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
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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