WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] header title does not work - shows as Untitled Document (6 posts)

  1. fogbutton
    Member
    Posted 1 year ago #

    Hello,

    I have been fiddling with various parts of my code for a while now to get the page title (the <title> tags) to work, but so far I've not succeeded. I have my blog title set, and as far as I know, the page title is supposed to pull from that, but it's not.

    Here's my blog: http://www.adriennewolter.com/blog/

    Here is the code for the title in the header.php of my parent theme, twenty eleven. I haven't altered it.

    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    
    	?></title>

    Any ideas? This seems like it should be a simple fix....

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    I don't understand. What's the problem exactly?

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    the meta title seems correct:
    <title>Soupçonneux | soup • son • new</title>

    - your site is just loading some other code before the Twenty Eleven header;

    this is the stray code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    
    c
    
    </body>
    </html>

    could be from a plugin (?)

  4. fogbutton
    Member
    Posted 1 year ago #

    Thank you! I found that stray code and got rid of it, and now it's working perfectly.

  5. lornalily
    Member
    Posted 10 months ago #

    Hi,

    I have a similar problem.

    Can someone please tell me how to set the title tags on my blog posts?

    All that is showing up is 'untitled document' even though I have filled out all your boxes on me seo wordpress plugin. yoast - http://wordpress.org/plugins/wordpress-seo/

    http://feedingkids.tv/blog/kids-breakfast-smoothie/

    please tell me what I am doing wrong or how to fix it.

    Thanks a lot :)
    Lorna

  6. WPyogi
    Volunteer Moderator
    Posted 10 months ago #

    @Lorna - please stick with your existing thread on this question - duplicate threads are deleted on these forums -

    http://wordpress.org/support/topic/untitled-document-showing-in-browser-tab-no-title-tag?replies=1

Topic Closed

This topic has been closed to new replies.

About this Topic