+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Title not showing on front static page

  1. #1
    Join Date
    Nov 2009
    Posts
    6

    Default Title not showing on front static page

    On a blog I'm working on, it has a static front page and the Title is showing as Mozilla Firefox and the tab title just shows the site URL "http://www.myklogica.es". The rest of the pages are behaving correctly.

    The title should be showing the name of the company Myklogica etc.

    I've tried a fix to the header.php file I found, but it didn't work.

    Any ideas? Thanks.

  2. #2
    Join Date
    Feb 2009
    Posts
    605

    Default

    You need to check your header.php and make sure your <title></title> looks like this:

    PHP Code:
    <title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('name'); echo(' — '); bloginfo('description'); } ?></title>
    It looks like all the other posts/pages don't have titles in the browser title bar.



    Quote Originally Posted by antorera View Post
    On a blog I'm working on, it has a static front page and the Title is showing as Mozilla Firefox and the tab title just shows the site URL "http://www.myklogica.es". The rest of the pages are behaving correctly.

    The title should be showing the name of the company Myklogica etc.

    I've tried a fix to the header.php file I found, but it didn't work.

    Any ideas? Thanks.

  3. #3
    Join Date
    Nov 2009
    Posts
    6

    Default

    Hello,

    Sorry, I had that commented out because I was testing it. Now it's back in and you can see what I'm talking about above, which is still happening.

    It's just affecting the front page now. I now have the title code reference above in the header.php page. Don't know what conflict is causing it to happen.

    Thanks.

  4. #4
    Join Date
    Feb 2009
    Posts
    605

    Default

    Hmmm that's really odd. Could you try changing the code in the <title></title> tags to just this:

    PHP Code:
    <?php bloginfo('name'); echo(' — '); bloginfo('description'); ?>
    Also try:

    PHP Code:
    <?php if (is_single() || is_page() || is_archive() || is_home()) { wp_title('',true); } else { bloginfo('name'); echo(' — '); bloginfo('description'); } ?>
    There may be some file overriding it but I can't figure out what without looking at alll of your files.




    Quote Originally Posted by antorera View Post
    Hello,

    Sorry, I had that commented out because I was testing it. Now it's back in and you can see what I'm talking about above, which is still happening.

    It's just affecting the front page now. I now have the title code reference above in the header.php page. Don't know what conflict is causing it to happen.

    Thanks.

  5. #5
    Join Date
    Nov 2009
    Posts
    6

    Default

    That didn't seem to work. It took out the titles in all the pages and even added the title within the page at the top.

    If it helps, here is the code in the header.php file:

    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 profile="http://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('name'); echo(' — '); bloginfo('description'); } ?></title>	
    
    	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    	
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    	<link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/custom.css" type="text/css" media="screen" />
    	<!--[if lte IE 7]>
    	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie7.css" media="screen" />
    	<![endif]-->
    	<!--[if lte IE 6]>
    	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie6.css" media="screen" />
    	<![endif]-->
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    	<?php if ( is_singular() ) { wp_enqueue_script( 'comment-reply' ); } ?>
    	<?php wp_head(); ?>
    </head>
    <body class="custom">
    
    <div id="container">
    
    	<div id="masthead">
    		<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
    		<h3><?php bloginfo('description'); ?></h3>
    	</div>
    
    	<ul id="nav">
    		<li <?php if (is_home()) echo('class="current_page_item" '); ?>></li>
    		<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
    		<!-- <li class="rss"><a href="<?php bloginfo('rss2_url'); ?>">RSS</a></li> -->
    	</ul>
    	
    <div id="header_img">
        <img src="<?php bloginfo('template_url'); ?>/images/cabecera_1.png" width="770px" height="140px" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?> header" />
    </div>
    Thanks for looking!

  6. #6
    Join Date
    Nov 2009
    Posts
    6

    Default

    Do you think something in the header image (which I changed) could be affecting it?

    Code:
    <div id="header_img">
    
        <img src="<?php bloginfo('template_url'); ?>/images/cabecera_1.png" width="770px" height="140px" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?> header" />
    
    </div>
    I hate to have the client's site up running without a proper title on the home page, so I appreciate your help!

    Thanks.

  7. #7
    Join Date
    Nov 2009
    Posts
    6

    Default

    I poured through every php file, and the only file that has any changes is the header.php file.

    From this original line of code:
    Code:
    <li <?php if (is_home()) echo('class="current_page_item" '); ?>><a href="<?php bloginfo('url'); ?>">front page</a></li>
    I removed this part:
    Code:
    <a href="<?php bloginfo('url'); ?>">front page</a></li>
    because it was causing an additional item in my menu bar to appear entitled "front page" and it was being placed in the home position (so basically I had two homes).

    Perhaps this is causing the title to disappear? If I shouldn't remove that line of code, how do I keep the Front Page from appearing?

    Please help, anyone?

    Thanks.

  8. #8
    Join Date
    Feb 2009
    Posts
    605

    Default

    Try this in between <title></title>:

    PHP Code:
    <?php wp_title('');  if(wp_title(''false)) { echo ' &ndash;'; } bloginfo('name'); ?>
    Also, please tell me what page you used on your front page and if it has a title. You may have left a blank title for your post somewhere.

    Sorry, this is really messing with my head too

  9. #9
    Join Date
    Nov 2009
    Posts
    6

    Talking

    Excellent! That seemed to do the trick so far!!!

    Thanks so much.

  10. #10
    Join Date
    Feb 2009
    Posts
    605

    Default

    Whew that's good to hear!




    Quote Originally Posted by antorera View Post
    Excellent! That seemed to do the trick so far!!!

    Thanks so much.

+ Reply to Thread

Similar Threads

  1. Static Home Page?
    By adell50 in forum Cutline Mods
    Replies: 16
    Last Post: 08-18-2010, 02:43 PM
  2. 404 error ONLY on front page
    By sbsmike in forum Bugs & Fixes
    Replies: 3
    Last Post: 05-25-2010, 12:42 PM
  3. Replies: 4
    Last Post: 03-11-2010, 04:03 AM
  4. Trying to figure out how to use the Front Page in the Nav bar
    By ACinnamond in forum Header & Nav Bar
    Replies: 2
    Last Post: 06-18-2009, 02:48 AM
  5. Digg's Not Dead - 2 Front Page Articles in 12 Hours
    By ryan in forum General Discussion
    Replies: 3
    Last Post: 02-11-2008, 08:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts