WordPress.org

Support

Support » WP-Advanced » Restrict plugin/filter to work only on custom RSS feed

Restrict plugin/filter to work only on custom RSS feed

  • Hi
    I am trying to figure out how I can restrict my plugin/filter to work on a custom RSS2 feed. At the moment, when I activate my plugin it affects all RSS feed outputs. I would like to affect only the output of the custom RSS.

    Any suggestions ? Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Well, how are you ‘calling,’ or what exactly defines, the custom feed? Are you passing a query var (i.e. $_GET) the plugin watches for?

    No, not at the moment.

    The custom feed needs to have a different size image as compared to the regular feed. I was using a plugin/filter to resize the images(which works fine) but I need ONLY the custom feed to have the updated image size.

    Perhaps if you set a PHP constant with the custom feed, and test on this along with (I assume) is_feed().

    Reference:
    http://php.net/language.constants

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    Well, how you do it really depends on how you’re generating this “custom feed”. We need to know more about how your feed works.

    Thanks for your inputs.I’ll try out the constant option.

    The custom feed template is the same as the rss2 feed. The only thing different would be the image sizes.I would like my plugin to affect only the output of the custom RSS.

    Any other options I could look at to generate 2 different outputs from same rss2 feed ?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Restrict plugin/filter to work only on custom RSS feed’ is closed to new replies.