Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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