Skip to content

Instantly share code, notes, and snippets.

@shemul49rmc
Last active December 31, 2015 05:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shemul49rmc/7942133 to your computer and use it in GitHub Desktop.
Save shemul49rmc/7942133 to your computer and use it in GitHub Desktop.
Add Custom Content After All WordPress Posts
/**
* Add Custom Content After All WordPress Posts By http://goo.gl/ht6fZo
*/
function add_after_post_content($content) {
if(!is_feed() && !is_home() && is_singular() && is_main_query()) {
$content .= '<p>YOUR CONTENT AFTER POST</p>';
}
return $content;
}
add_filter('the_content', 'add_after_post_content');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment