Created
May 15, 2013 20:33
-
-
Save ajmorris/5587141 to your computer and use it in GitHub Desktop.
Adding to end of the_content
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
function add_footer_info($content) { | |
if( is_single() && is_main_query() ) { | |
$content .= get_template_part('includes/blog', 'author'); | |
} | |
return $content; | |
} | |
add_filter('the_content', 'add_footer_info', 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Basically I only want this to display the template part on single blog posts, no where else. So I added is_main_query() to not include CPTs.