• I have just upgraded from 2.6.5 to 2.7.

    Easy as usual and all works except the title tag on my index pag fails.

    So….

    I have a page and my set up uses this as my index via the settings in setting>reading>static page.

    The title tag does show (when looking in the source code it is just a blank space.

    <?php wp_title('--',true,''); ?>

    ALL other pages work (pages, posts, search, categories etc).

    Any ideas why?

    (BTW – I have tried different versions of the wp_title tag…. no difference.

    Eddie

Viewing 15 replies - 1 through 15 (of 16 total)
  • I’m experiencing the same issue on a new 2.7 install. I’m using a static page for my Reading>”Front Page” setting and I’ve verified that the page’s Title Tag DOES display when it’s NOT selected as the front page. And also verified that when I toggle back to it as the front page, the Title Tag disappears again.

    Yeah… me too. It’s only in 2.7

    I have 2 sites that I’ve upgraded to 2.7 and am not using the blog as the home pages, but rather having a static page as the home pages (same as posts above). So I don’t know if its fine with having the blog on the home page… but any ideas on how to fix this? I’ve tried messing with the php and have had no luck

    What theme do you have, and what is the surrounding code around wp_title (any is_home(), etc.)?

    <?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?>

    Here is the code I have for the Title Tags. They work fine for the every page but the index. Also, I have upgraded another site to 2.7 that uses the blog as the home page and the title tags are fine. It’s only when another page is set to be the index page.

    Thanks in advance for your help!

    Change this code <?php if (is_home()) { bloginfo('name'); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?>

    to

    <?php if (is_front_page()) { bloginfo(‘name’); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(''); ?>

    My problem was solved using this. Thank god.

    Changing is_home to is_front_page works.

    Give it a try

    thankyou

    My wp_title() also doesn’t show on the front page (not using an if-statement or anything), but does show up on all other pages..

    I’m using:
    <?php wp_title(''); ?> - <?php bloginfo('name'); ?>

    Beautiful!!! Thanks so much!!!

    Change this code <?php if (is_home()) { bloginfo(‘name’); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(”); ?>

    to

    <?php if (is_front_page()) { bloginfo(‘name’); ?><?php } elseif (is_category() || is_page() ||is_single()) { ?> <?php } ?><?php wp_title(”); ?>

    My problem was solved using this. Thank god.

    What if I set a page to be the blog’s static front page, but then I also want the page’s title to show up in <title> </title>?

    In your solution the blog’s name is the <title> irregardless of the page’s own title. I tried:
    <title><?php if (is_front_page()) { wp_title(”);} ?>
    but that doesn’t work

    peter: The problem is that wp_title returns nothing if you’re on the front page. Probably a bug. Best workaround I can think of is just use one of the methods above, and hardcode the title you want….

    Hardcoding the title didn’t work for me for a particular project, and I did notice this bug. Not sure if it’s the best workaround, as I know modding the core is generally a no-no, but this did the trick for me.

    Mod /wp-includes/general-template.php (Line 435)

    From:

    if ( is_single() || ( is_page() && !is_front_page() ) ) {

    To:

    if ( is_single() || is_page() || is_front_page() ) {

    Again, not sure of any ramifications, but that did the trick for me.

    Not so sure this is 27 bug as I have 263 currently installed and now have this same problem. My code in header.php is:

    <title><?php wp_title(”); ?><?php if(wp_title(”, false)) { echo ‘ :’; } ?> <?php bloginfo(‘name’); ?></title>

    Title code is same for all default pages.

    I would have tried the includes modification, but I didn’t see the referenced line in my general-template.php file.

    Could someone post the suggested modification for this example as I don’t know php well enough to mess with the syntax?

    Thanks.

    I tried a couple plugins (All in One SEO and HeadSpace2), but neither worked… nor did the options above… but then I poked through the Codex a bit and found one that I tweaked, and it works like a charm.

    (in WP 2.7.1, by the way)

    <title>
    <?php if (is_front_page () ) {
    bloginfo(‘name’); echo ” » “; bloginfo(‘description’);
    } elseif ( is_home() ) {
    bloginfo(‘name’); echo ” » “; echo “Blog”;
    } elseif ( is_category() ) {
    bloginfo(‘name’); echo ” » “; single_cat_title();
    } elseif (is_single() || is_page() ) {
    single_post_title(); echo ” » “; bloginfo(‘name’);
    } elseif (is_search() ) {
    bloginfo(‘name’); echo ” search results: “; echo wp_specialchars($s);
    } else { wp_title(‘true’); }
    ?>
    </title>

    There’s a chance there’s no bug at all in wordpress 2.7. causing this no titlle for static index pages problem. In Settings, choose All in One SEO, make sure “Rewrite Titles” is checked. I have yet to ever see this feature actually ever rewrite a title.

    Roberts

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘WP 2.7 Index title fails after upgrade’ is closed to new replies.