sokae
Forum Replies Created
-
Forum: Plugins
In reply to: [AMP] NewsArticle converted to BlogPostingwhere to paste the code? in which file ?
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/my-amp-metadata-logo.png’,
‘height’ => 60,
‘width’ => 600,
);
return $metadata;
}Thanks
Forum: Plugins
In reply to: [AMP] Amp pages not showing on GoogleI have the same problem 🙁
Forum: Plugins
In reply to: [AMP] Structured Data Testing Tool "Logo Error"Hello Leon2017, thanks for your help. But the problem is on
<script type=”application/ld+json”>{“@context”:”http:\/\/schema.org”,”@type”:”BlogPosting”,”mainEntityOfPage”:”xxxx”,”publisher”:{“@type”:”Organization”,”name”:”xxx”},”headline”:”xxx”,”datePublished”:”2016-02-28T11:50:51+00:00″,”dateModified”:”2016-02-28T11:50:51+00:00″,”author”:{“@type”:”Person”,”name”:”xxx”},”image”:{“@type”:”ImageObject”,”url”:”xxx”,”width”:768,”height”:432}}</script>
On my AMP page doesn’t appear the info: “logo”:{“@type”:”ImageObject”,”url”:”xxx”,”width”:x,”height”:x}}
Why? Any solutions?