WordPress.org

Support

Support » Plugins and Hacks » Hacks » How to know if you are in the_content() or the_excerpt()?

How to know if you are in the_content() or the_excerpt()?

  • A filter installed for the_content() like:

    add_filter('the_content', 'my_filter');

    appears to not only run on the_content() as one should expect, but also runs on the_excerpt().

    This is a problem for me. As there are no boolean functions: is_content() and is_excerpt(), how do i know if i am in the_content() or in the_excerpt()?

  • The topic ‘How to know if you are in the_content() or the_excerpt()?’ is closed to new replies.
Skip to toolbar