Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

A type of hook that provides a way for content to be overridden programatically

Together with actions, filters make up the two different types of hooks in WordPress. They allow plugins and themes to modify or replace the contents of a variable created by the WordPress core, or by other plugin/theme.

For example, if you wanted to add a signature to the end of every post, you could use the the_content filter like this:

function addSignatureToPosts( $content )
    return $content . '<p>Your custom signature goes here.</p>';
add_filter( 'the_content', 'addSignatureToPosts' );
history | excerpt history