Skip to content

Instantly share code, notes, and snippets.

@Pross
Created March 4, 2013 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/5081534 to your computer and use it in GitHub Desktop.
Save Pross/5081534 to your computer and use it in GitHub Desktop.
Add signature to post/pages with the_content filter
add_filter( 'the_content', 'add_my_signature' );
function add_my_signature( $content ){
if( ! is_single() ) // if were not on a post/page just return the content.
return $content;
$sig = '<br />Thanks for reading!'; // Add a sig to the post/page content and return.
return $content . $sig;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment