Warning: Cannot modify header information - headers already sent by (output started at /home/content/51/5126851/html/wp-includes/post-template.php:54) in /home/content/51/5126851/html/wp-includes/pluggable.php on line 890
I know I need to do something to my post-template.php
file, but I'm not sure what. I looked at the other answers but mine seems a little different. Here's what the relevant function looks 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 )
return;
$title = $before . $title . $after;
if ( $echo )
echo $title; // <-- This is line 54 of post-template.php
else
return $title;
}