function build_metadata need more info in order to validate as amp page
-
On class-amp-post.php file, function build_metadata shows as this:
private function build_metadata() {
$data = array(
'@context' => 'https://schema.org',
'@type' => 'BlogPosting', // TODO: change this for pages
'mainEntityOfPage' => get_permalink( $this->ID ),
'headline' => get_the_title( $this->ID ),
'datePublished' => get_the_date( 'c', $this->ID ),
'author' => array(
'@type' => 'Person',
'name' => $this->author->display_name,
),
'publisher' => array(
'@type' => 'Organization',
'name' => get_bloginfo( 'name' ),
),
);return $data;
}But in order to show as valid AMP page on Google webmaster tools ( Section Search Appearance – Accelerated Mobile Pages) it has to show this fields too:
logo: mising and it is required
image: mising and it is required
dateModified: mising and it is recommendedBests,
Jose
- The topic ‘function build_metadata need more info in order to validate as amp page’ is closed to new replies.