AMP amp_post_template_metadata doesn't seem to work
-
This filter doesn’t seem to change anything…
add_filter( 'amp_post_template_metadata', 'xyz_amp_modify_json_metadata', 10, 2 ); function xyz_amp_modify_json_metadata( $metadata, $post ) { $metadata['@type'] = 'NewsArticle'; $metadata['publisher']['logo'] = array( '@type' => 'ImageObject', 'url' => get_template_directory_uri().'/images/logo.png', 'height' => 60, 'width' => 600, ); return $metadata; }
It returns the default BlogPosting type and it doesn’t add the logo info either
Another question, to get an AMP page included on Google Search, does the AMP page url of the site need to use HTTPS ??
Thanks
- The topic ‘AMP amp_post_template_metadata doesn't seem to work’ is closed to new replies.