WordPress.org

Ready to get started?Download WordPress

Forums

Greg's High Performance SEO
[resolved] title tag content appears in body (2 posts)

  1. rebelit
    Member
    Posted 3 years ago #

    Hi, I am using a child theme based on Thematic 0.9.7.7

    So I have used child theme override function for the title tag. However the ghpSEO title appears immediately after the body tag, whilst the title tag is empty.

    ...
    	if(function_exists('ghpseo_output')) {
    //this doesn't work - Title appears immediately under body tag
    //$doctitle = "\t <title>" . ghpseo_output('main_title') . "</title>\n\n";
    			$doctitle = "\t <title>This works fine</title>\n\n";
    		}
    	else {
                    //this works
    		$doctitle = "\t" . "<title>" . $doctitle . "</title>" . "\n\n";
    	}
    	echo $doctitle;
    } // end thematic_doctitle

    If I just use a static string here, or thematics default code it works as it should.

    Any idea what is happening here?

  2. GregMulhauser
    Member
    Plugin Author

    Posted 2 years ago #

    If you have a look at the plugin's instructions, you'll see there's a second optional parameter for the GHPSEO output function that controls whether the output is automatically echoed. If you try to assign the GHPSEO output to a variable via a function is itself echoing that output, naturally it won't be pretty.

    All the best,
    Greg

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic