Skip to content

Instantly share code, notes, and snippets.

@kheniparth
Created March 21, 2015 11:22
Show Gist options
  • Save kheniparth/619d83294d76c9d319f9 to your computer and use it in GitHub Desktop.
Save kheniparth/619d83294d76c9d319f9 to your computer and use it in GitHub Desktop.
Add a fixed message into all WordPress posts.
function TM_add_to_post_content($content) {
if (is_single()) {
$content .= '<div style="text-align:right;width:700px;font-size:15px;clear:both;margin-bottom:10px;"><a style="text-decoration:none;color:#999;" title="Report an Error" href="http://www.techmuzz.com/report-an-error/">Report an Error</a></div>';
}
return $content;
}
add_filter ('the_content', 'TM_add_to_post_content', 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment