Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Jetpack open graph tags in AMP stories #13492

Closed
spacedmonkey opened this issue Sep 19, 2019 · 1 comment
Closed

Add support for Jetpack open graph tags in AMP stories #13492

spacedmonkey opened this issue Sep 19, 2019 · 1 comment
Labels
AMP [Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Milestone

Comments

@spacedmonkey
Copy link
Contributor

AMP Stories are a custom post type in the AMP Plugin.
However, the template does not use call wp_head, so the OG tags generated by jetpack are not inserted. AMP stories has a custom action amp_story_head which performs a similar action, introduced in ampproject/amp-wp#3039 .

Describe the solution you'd like

A solution for this should be pretty simple. In the case Jetpack_AMP_Support there is already a hook into amp_post_template_head to add og graph tags in this line.

// include Jetpack og tags when rendering native AMP head
add_action( 'amp_post_template_head', array( 'Jetpack_AMP_Support', 'amp_post_jetpack_og_tags' ) );

Add support for amp stories could be as simple as adding the following code.

add_action( 'amp_story_head', array( 'Jetpack_AMP_Support', 'amp_post_jetpack_og_tags' ) );

Additional context

Related:
Yoast/wordpress-seo#13446
ampproject/amp-wp#3039
ampproject/amp-wp#3179

Looping @westonruter and @swissspidy for visibility.

@jeherve jeherve added the AMP label Sep 19, 2019
@jeherve jeherve added this to the 7.8 milestone Sep 19, 2019
@jeherve
Copy link
Member

jeherve commented Sep 19, 2019

This is in progress in #13416

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Sharing Post sharing, sharing buttons labels Sep 19, 2019
@jeherve jeherve changed the title Add upport Jetpack open graph tags in AMP stories Add support for Jetpack open graph tags in AMP stories Sep 19, 2019
@jeherve jeherve closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMP [Feature] Sharing Post sharing, sharing buttons [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

No branches or pull requests

2 participants