WordPress.org

Ready to get started?Download WordPress

Forums

add_filter on the_content but not on the_excerpt (1 post)

  1. Tom(dB)
    Member
    Posted 4 years ago #

    Is there a way I can use add_filter('the_content', 'my_function'); to only act upon the_content()?

    Currently if the_excerpt is displayed on a page in addition to the_content() my function is executed twice.

    I want it to only run on is_single() pages once, but i can't figure out any other hooks that always appear on a single page and only once. Any help appreciated.

    I found a reference to the problem here: http://wordpress.org/support/topic/239391?replies=4#post-1181669 but I'm not sure of the answer.

Topic Closed

This topic has been closed to new replies.

About this Topic