Created
March 4, 2013 10:58
-
-
Save Pross/5081534 to your computer and use it in GitHub Desktop.
Add signature to post/pages with the_content filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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