• Resolved solid_snake

    (@solid_snake)


    Hello,

    According to Google Best practices, your H1 tag and Title tag should be consistent. See note here: https://support.google.com/news/publisher-center/answer/93981?hl=en&ref_topic=9010385&vid=0-239082747385-1531940355409

    However, this doesnt seem to be the case with this plugin. This plugin is adding the sitename in front of the post title for the title tag.

    So I have decided to fix this myself and wanted to ask whether a. this is the correct method and b. do you plan to address this issue in a plugin update?

    In class-amp-post-template.php, I have replaced wp_get_document_title() with get_the_title($post_id)

    ‘document_title’ => function_exists( ‘wp_get_document_title’ ) ? get_the_title($post_id) : wp_title( ”, false ), // back-compat with 4.3

    Also, for our non-AMP website we are using single_post_title() to populate the title tag but for AMP as you can see above we used get_the_title($post_id). Is this okay and whether get_the_title($post_id) and single_post_title() generate the same exact output irrespective of any special characters etc?

    Thanks for your time!

    • This topic was modified 6 years, 4 months ago by solid_snake.
Viewing 4 replies - 1 through 4 (of 4 total)
  • What version of the plugin are you using, are you using Yoast, Genesis or All in one SEO? an example URL would help.

    Both in AMP takeover and on hybrid systems I don’t see this occurring on Version 0.9.97.6 and version 0.9.97.7 . The title tag rendered as defined in my doctitle settings per page.

    Plugin Contributor ampforwp

    (@ampforwp)

    Hello Solid_snake,

    Thank you for writing to us.

    I appreciate your effort.

    With regards to your query, could you send me the Proper URL of which you are talking about so that I can also check at my end?

    Thread Starter solid_snake

    (@solid_snake)

    @ampforwp Can I email it to you please?

    Plugin Contributor ampforwp

    (@ampforwp)

    Hi Solid_snake,

    You can contact us at [email protected], we will definitely work towards it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Regarding AMP Title’ is closed to new replies.