Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes i have same problem 99% of pages with errors

    It looks as if a lot of the “errors” from the Search Console tool appear because the plugin uses the “BlogPosting” markup, where the tool is looking for the “NewsArticle” markup.

    Also, the plugin does not include markup for “image” or “logo” which are both required. It is still a new plugin, and hopefully the authors see the latest updates from Google’s tools and make some adjustments.

    Thread Starter HoneyTrek

    (@honeytrek)

    Yeah, I am hopeful they will make the necessary tweaks, given the new updates. I just want to make sure I am compliant.

    Thanks for guys chiming in!
    Mike

    I hope the necessary changes will be made as well.

    I think part of the problem is that not all blog posts have the required elements…

    Note the conclusions that StudioPress recently came to about their own Schema markup on their themes:

    https://www.studiopress.com/releases/genesis-2-2-6.htm

    I get all my post validated on google webmaster tool for amp using type Blogposting.

    I changed the function build_metadata() on file plugins/amp/class-amp-post.php to:

    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 ),
                            'dateModified'=> get_post_modified_time( 'c','' , $this->ID ),
                            'author' => array(
                                    '@type' => 'Person',
                                    'name' => $this->author->display_name,
                            ),
                            'image' => array(
                                            '@type' => 'ImageObject',
                                            'url' => get_the_post_thumbnail_url($this->ID),
                                            'width' => '696',
                                            'height' => '580',
    
                            ),
                            'publisher' => array(
                                    '@type' => 'Organization',
                                    'name' => get_bloginfo( 'name' ),
                                    'logo' => array(
                                            '@type' => 'ImageObject',
                                            'url' => 'https://url_to_my_logo.jpg',
                                            'width' => '187',
                                            'height' => '143',
                                    ),
                            ),
                    );
    
                    return $data;
            }

    hope it helps

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lots of AMP errors (nearly 98% of my pages)’ is closed to new replies.