Warning: Cannot modify header information - headers already sent by (output began at /home/content/51/5126851/html/wordpress-includes/publish-template.php:54) in /home/content/51/5126851/html/wordpress-includes/pluggable.php online 890

I understand I have to make a move to my post-template.php file, but I am unsure what. I checked out another solutions but mine appears quite different. This is what the appropriate function appears like:

 * Display or retrieve the current post title with optional content.
 * @since 0.71
 * @param string $before Optional. Content to prepend to the title.
 * @param string $after Optional. Content to append to the title.
 * @param bool $echo Optional, default to true.Whether to display or return.
 * @return null|string Null on no title. String if $echo parameter is false.
function the_title($before = '', $after = '', $echo = true) {
    $title = get_the_title();

    if ( strlen($title) == 0 )

    $title = $before . $title . $after;

    if ( $echo )
        echo $title; // <-- This is line 54 of post-template.php
        return $title;

My first recommendation is always to learn to format code for SO. And learn how to cut lower your condition towards the minimum someone must solve it.

My second is always to to research the line pointed out within the error. I simply did, and appear things i found:

if ( $echo )
    echo $title;

So you've now learned what's outputting stuff, what else could you do about this?

Well, another a part of that statement is:

    return $title;

Now, I am no Wordpress expert, but I am sure that you could exercise the very first factor that requires altering.

You should not be editing files in wp-includes without a very good reason along with a good knowledge of what you are doing. WordPress is extension via styles and plug ins in just about all situations - you need to rarely, when, need to hack core code to behave.