WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Experienced User: Wondering if I understood the title tag template correctly (10 posts)

  1. ankurj
    Member
    Posted 4 months ago #

    Ok, I have been a long time user of WP and have been using All in one SEO(AIOS).

    Given the multitude of functions it has I thought of trying Yoast SEO plugin.

    In AIOS, I would define a post title (How to tie a a tie?) and it will automatically take the site name (Mashable) from the template to make it
    for example: How to tie a a tie? | Mashable

    We do have template system in WP SEO but it works in either/or mode. If I don't set anything in my post title it picks the default format fine but in case I put something in the post level title box, it doesn't automatically pick the site name.

    I am wondering, is this the expected behavior of this plugin?

    (I have tinkered with settings like force rewrite, setting wp_title etc but all in vain)

    Thanks!

    https://wordpress.org/plugins/wordpress-seo/

  2. neilgee
    Member
    Posted 4 months ago #

    It does work the way you need it too.

    In SEO>Titles & Metas> Post Types, set the Posts Title Template to be %%title%% | %%sitename%%

    Then in your actual post you would for example just enter in the the post title field How to tie a a tie?, you don't change the title in the Yoast SEO Title field and then the template structure is applied giving you How to tie a a tie? | Mashable

    If you want to overright it then you would fill in the Yoast SEO Title Field

  3. ankurj
    Member
    Posted 4 months ago #

    ah, so what I thought turned out to be correct.

    @neilgee: This looks like a major feature which Yoast WP SEO plugin has not implemented and which comes out-of-the-box with AIOS.

    Let me explain a bit more.

    In almost all themes of today, WordPress post title field becomes an "h1" header in a post while Yoast SEO title field becomes a "title" of the post.

    If I keep Yoast SEO title field as-it-is (ie I don't write anything inside), it will take the default value from wordpress post title field and append it with the template defined - so far so good.

    but what if I want to customize the Yoast title field?

    So I want "h1" header to be WP post title field (How to tie a tie?) while I want "title" to be say

    "Check how to tie a tie | Mashable"

    My question is that ideally WP Yoast SEO plugin should not require us to write the last part of string (| Mashable) in the Yoast SEO title box. It should take that automatically from the template but that doesn't happen here. However I am used to such a feature in AIOS.

    I hope I was able to make myself clear. Please let me know if I am wrong in my thinking here.

    Thanks!

  4. neilgee
    Member
    Posted 4 months ago #

    You could just then adjust the the wp_title

    <title><?php wp_title(''); ?> | <?php bloginfo('name'); ?></title>

    Then in the In SEO>Titles & Metas> Post Types, set the Posts Title Template to be %%title%%

  5. ankurj
    Member
    Posted 4 months ago #

    Ok, nice.

    How do you handle home page in that case? (since you don't want the word Mashable repeating there.

    Normally they are structured as Mashable | A Tech blog but in this case it would become Mashable | A Tech blog | Mashable

    Will you use a conditional statement in the header.php and check for home page? or do you have any better way?

  6. neilgee
    Member
    Posted 4 months ago #

    I updated my earlier post with a WP function <?php bloginfo('name'); ?> to include the sitename which you control in Dashboard>Settings>General

    For home page there is a specific control in WordPress SEO - SEO>Titles & Metas> Home

    If you wanted to use the earlier suggestion but not on the home page you could use a conditional statement or simply use a front-page.php template which just uses
    <title><?php wp_title(''); ?></title>

  7. kchayka
    Member
    Posted 4 months ago #

    I, too, have been an AIOSEO user and am confused by how titles are used/set in Yoast.

    I have not found where Yoast allows me to use a different <title> vs. <h1>.

    The Yoast settings at the bottom of a page do not allow me to edit the Title field so it can be tweaked separately from the main page heading. AIOSEO provides this ability by default. I have tried checking/unchecking the "rewrite title" box in Yoast settings but it had no effect.

    How is this done?

  8. kchayka
    Member
    Posted 4 months ago #

    Never mind - figured it out. I was trying to modify what was shown in the Yoast Title field in the page editor. It has to be completely rewritten.

  9. freedailysameness
    Member
    Posted 4 months ago #

    Hey Sorry,

    I think I am getting the same issue as @ankurj - I am not a coder but I'll do something if someone can explain it.

    Basically - by updating the SEO title in Yoast, its overwriting my page headlines (on pages only not posts). So for example on a page I have called The Writers I want :

    The SEO Title Tag to say "Writers Characters Shenanigans | Free Daily Sameness"
    I want the page headline to say "The Writers"

    Unfortunately Yoast has changed my Page Headline to say the same as the SEO title Tag. Example here : http://freedailysameness.com/the-writers/

    The same control I can get over posts, I cannot get on my pages, and I can't work out why. I do know that I don't want the "| Free Daily Sameness" syntax to be appearing on every page headline - but of course I want it to remain on the Title Tag.

    Any ideas?

  10. neilgee
    Member
    Posted 4 months ago #

    It wouldn't be Yoast Plugin changing the fields, most probably your theme, what is the code in the templates single.php and page.php in between the:
    <title></title>
    Tags in the header

Reply

You must log in to post.

About this Plugin

About this Topic