by Wax
3 replies
  • WEB DESIGN
  • |
Hello,

I have a problem with the title tag of my Wordpress blog.

Right now I have this in header.php -

Code:
<title><?php wp_title(""); ?>&nbsp;|&nbsp;<?php bloginfo("name"); ?></title>
This works well on posts. It displays as

Code:
Post name | WP Blog name
However, on the homepage, it displays as

Code:
| WP Blog name
I'm trying to get the homepage to get rid of the |. Any suggestions? Been trying to solve this for a while :confused:
#meta #problem #tag
  • Profile picture of the author GCY
    Hi,

    hmm... I would do it like

    PHP Code:
    <?php
    if (is_home() || is_front_page() ) {
     echo 
    get_bloginfo("name");
    } else {
      echo 
    wp_get_title("") . '&nbsp;|&nbsp;' get_bloginfo("name");
    }
    ?>
    No guaranty that it works... but something like that.
    {{ DiscussionBoard.errors[4765008].message }}
    • Profile picture of the author Honest SEO
      I think you must have enabled /disabled any seo plugins and settings of that plugins still not changed / or deleted.

      SO install any seo plugin again and then change your homepage title and description .
      {{ DiscussionBoard.errors[4765062].message }}
  • Profile picture of the author Wax
    Thanks, installed All in One SEO and it fixed the problem. I'm more of a raw HTML/CSS guy, still getting used to WP
    {{ DiscussionBoard.errors[4765222].message }}

Trending Topics