Tagged: , ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2777

    How do I get the home page not to use the blog title without just emptying the field in settings? For SEO purposes, need the title to say:

    Precision Investment Castings | Dal-Air Investment Castings – Point TX

    However, says Dal-Air Investment CastingsPrecision Investment Castings | Dal-Air Investment Castings – Point TX – where the first Dal-Air is coming from the site name on the settings page. The second part comes from an SEO plug-in that works great on all pages, but since the Home Page is not an actual page, it populates as above.

    Development site is

    http://66.147.244.213/~dalairca

    Thanks.

    #39258

    Hey,

    the title is generated in header.php. Search for following code:

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

    and change the title as you like.

    #39259

    Furthermore, is it possible to change part of the title so that it still shows the main page’s title plus a subpage?

    For example, main page would be titled HOMEPAGE

    Then the “about” page would be titled HOMEPAGE | About

    Thanks!

    #39260

    Yes,

    just replace following code in header.php:

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

    with:

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

    #39261

    I’ve made both of the changes above and now my home page reads Bookkeeping Services | JNW Business SolutionsJNW Business Solutions |. My other pages seem to read correctly. Did I make an incorrect change?

    My site is http://www.jnwsolutions.com

    Thanks.

    #39262

    I played around with it some more and fixed it. Sorry if I wasted your time.

    #39263

    Hey,

    No problem, let us know if you have any other questions.

    James

    #39264

    here is correct code

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

    #39265

    Hey,

    what do you mean with “here is correct code” :)

    #39266

    The code James posted was this

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

    and this the correct one

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

    I changed the place of <?php } ?> !

    because if they use the code James provided they will face the problem mrwalker mentioned.

    I’m no expert but I just wanted to put the right so if someone else wanted to do the same thing to their site they wouldn’t face any problems. :)

    #39267

    Ah ok, I see – Thanks for correcting it :)

Viewing 11 posts - 1 through 11 (of 11 total)

The topic ‘Home Page Title’ is closed to new replies.