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

  1. rebelit
    Posted 4 years ago #

    Hi, I am using a child theme based on Thematic

    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
    Plugin Author

    Posted 3 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,

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Greg's High Performance SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic