Forums

blog title and post name (6 posts)

  1. foll47
    Member
    Posted 5 years ago #

    Hi,

    I have correctly changed the post urls to this postname format.
    http://www.follettmotors.com/vwaudiblog/audi-a3-water-pump-with-plastic-impeller.htm

    However, Google displays the post in its results as:

    Follettmotors.com VW AUDI Blog
    Audi A3 1.8 T Water Pump with plastic impeller. Water pumps with plastic impellers may not be as reliable as those with metal impellers ...
    http://www.follettmotors.com/vwaudiblog/audi-a3-water-pump-with-plastic-impeller.htm - 42k -

    Question: How do I amend the post title so that it is the same as the postname url (ie, not 'Follettmotors.com VW AUDI Blog - which is the blog name)

    Ideally, I want results to be displayed in this format

    Audi A3 water pump with plastic impeller
    Audi A3 1.8 T Water Pump with plastic impeller. Water pumps with plastic impellers may not be as reliable as those with metal impellers ...
    http://www.follettmotors.com/vwaudiblog/audi-a3-water-pump-with-plastic-impeller.htm - 42k -

    thanks and regards.

  2. Andrew Ozz
    WordPress Dev
    Posted 5 years ago #

    Just use <?php wp_title(); ?> in your title tag in the header. If you want to customize it more, have a look here:
    http://codex.wordpress.org/Template_Tags/wp_title

  3. foll47
    Member
    Posted 5 years ago #

    Thanks. I'm a little unsure. Is this for the header.php or the index.php?
    My header.php currently has:

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->

  4. Chris_K
    Member
    Posted 5 years ago #

    Surely your theme's header.php has more than that?

    Regardless, look through your theme files and find the <title> ... </title> tags. What's currently there?

  5. foll47
    Member
    Posted 5 years ago #

    currently title tags on header.php read
    <title>Follettmotors.com VW AUDI Blog </title>

    so I should replace with this (?)

    <title><?php wp_title(); ?></title>

  6. Chris_K
    Member
    Posted 5 years ago #

    Sounds like you want something like this (from the link provided above)

    <title>
    <?php wp_title(' '); ?>
    <?php if(wp_title(' ', false)) { echo '--'; } ?>
    <?php bloginfo('name'); ?>
    </title>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.