Forums

[resolved] Feed detection (2 posts)

  1. brianhogg
    Member
    Posted 9 months ago #

    Hi all,

    Am looking for a reliable, (relatively) elegant way to detect if the page being accessed is a feed or not. Essentially I'm adding logic in an init hook that I do not want to execute if they're not accessing a regular page. Checking for a feed get parameter wouldn't work if they're using redirects, among other things.

    Thanks for any suggestions!

    Regards,
    Brian

  2. brianhogg
    Member
    Posted 9 months ago #

    Am new to WordPress plugin development and missed the listing of Conditional Tags:

    http://codex.wordpress.org/Conditional_Tags

    Looks like is_feed() will do the trick!

Reply

You must log in to post.

About this Topic

Tags