Forums

Best Meta Tag Plug-in (8 posts)

  1. v2006
    Member
    Posted 7 years ago #

    I only see meta tag plug-ins for the description and and keyword meta tags.

    Do all templates insert the title tag of each post automactically?

    If not, is there a plug-in that includes this meta tag also?

    What plug-in do you recommend?

  2. petit
    Member
    Posted 7 years ago #

    By title tag, do you mean the post slug?

  3. Kafkaesqui

    Posted 7 years ago #

    Titles are not considered "meta" in an HTML doc.

    To add post titles, make sure this is used in your theme's <title> element:

    http://codex.wordpress.org/Template_Tags/wp_title

  4. v2006
    Member
    Posted 7 years ago #

    Some clarification please

    Will this default code include the title of each post/page generated?

    <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>

  5. Kafkaesqui

    Posted 7 years ago #

    It should, yes. The

    if ( is_single() ) { }

    portion outputs "ยป Blog Archive" only on single post pages, while wp_title() displays the post's title. Is that not working?

  6. v2006
    Member
    Posted 7 years ago #

    Yes, it is but what are the merits of replacing the above code with

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

    This code appears to be quite different

    Thank you

  7. Kafkaesqui

    Posted 7 years ago #

    It's different only in that whatever wp_title() displays comes before blog name; the if(wp_title(' ', false) tests on if it returns something, and when it does adds a separator (--) between the two.

    But merits? That's not something I'd make a judgement on, since it all depends on how *you* want your titles.

  8. v2006
    Member
    Posted 7 years ago #

    Thanks very much for the clarification and taking the time to answer.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags