Excerpt is being added above the content, but it should be after it
You are echoing the content of the excerpt, which is being put into the header. Use get_the_excerpt() instead: function after_post_content($content){ if (is_single()) { $content .= get_the_excerpt(); } return $content; } add_filter( “the_content”, “after_post_content”); Generally, WordPress functions beginning with the_ will echo the output, while functions starting will get_the_… will get the value.