This issue was reported recently: https://ww.wp.xz.cn/support/topic/error-logo-datos-estructurados/
We just put in a fix for the plugin which will be part of the next release. In the meantime, you can use the workaround code which is included in the description of this pull request: https://github.com/ampproject/amp-wp/pull/5121
Thanks, Weston! Is it also possible to make the AMP page copy the structured data from the original post?
It depends on how you are adding the structured data on the non-AMP page. Is it being added by a plugin? Yoast will output the same structured data on AMP and non-AMP.
We add our own schema markup in the header of individual posts. Yoast’s structured data option doesn’t include many properties we want to utilize for rich results. And we use headers and footers script plugin to add individual JSON-LD.
What is the PHP code you are using to add that to the non-AMP posts? I assume a function you hook onto the wp_head action?
OK, great. Since you’re using Reader mode there is a dedicated hook you can use instead for the AMP pages: amp_post_template_head.
I believe this is the necessary plugin code:
add_action( 'plugins_loaded', function() {
global $shfs_header_and_footer_scripts;
if ( ! empty( $shfs_header_and_footer_scripts ) ) {
add_action( 'amp_post_template_head', array( $shfs_header_and_footer_scripts, 'wp_head' ) );
}
} );
Do note that this is not necessary if using Transitional or Standard mode, since the wp_head hook is used. It is also won’t be necessary in the upcoming v2.0 when a Reader theme has been selected as opposed to the “Legacy” AMP Reader mode theme.
-
This reply was modified 5 years, 10 months ago by
Weston Ruter.
Thanks so much Weston!
Do you have an ETA for the v2.0?
ETA for 2.0 is August 18th. There are beta pre-releases available for testing: https://github.com/ampproject/amp-wp/releases