Support » Plugins » Content Filter – For site not feed.

  • I’m building a plugin and it adds code to the content via the content filter and it works great. However it also adds content to the feed when that’s called.

    How can I ensure that my filter only runs in web mode not in feed mode?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    In your plugin:

    if (!is_feed())
    // do your stuff

    Thanks Otto42. My guess is that WordPress only updates the feed ever so many minutes so I’ll have to wait for that. 🙂

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Actually, WordPress creates the feed on demand. There’s no update process to speak of.

    Now, if you’re using WP-Cache or routing through feedburner or something, then yes, that might cause a delay.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Content Filter – For site not feed.’ is closed to new replies.