AMP - Accelerated Mobile Pages

I think this is more like a suggestion than a support request.

I have Sydney Pro in my website and I really love it even more, I have been asked a few times what theme I am using and I always recommend aThemes.

You know, google now is giving preference to blogs that have AMP (Accelerated Mobile Pages) pages. It’s a bummer, I don’t like it but unfortunately google is still the main source of web traffic.

I installed the AMP plugin but it does not seems to work fine, lots of data structure errors. I gave up because I realise is not an easy fix and I will not have enough technical knowledge to fix it.

Do you have any plans of realising an updated version of the theme prepared to AMP? Personally I would be happy to pay a little more to have AMP pages and structure data fixed.

Leaving here the suggestion.

Keep up with the good work!
Cheers,
Rachel

Hi,

This is something we’re planning to look into, though I’m not sure at this point to what extent it can be applied for the business layout of the theme.

I’m curious what structured data errors you’re referring to. There was only (entry-title) which has been fixed a while ago. There are also mentions of missing date/author but those come from pages and WP themes traditionally doesn’t have those elements on pages, only posts. This behavior is also present on the default themes.

Hatom errors - still missing author and updated. Tried a lot of things and can’t get ridden of it.

AMP sucks :frowning: I like your mobile template - sometimes I think we spend more time trying to comply with google than producing contents. As far as I know at this moment AMP would only be applicable to blog posts, it would certainly help though.

My site is http://www.myquirkygifts.com by the way.

That’s what I’m saying, WordPress pages traditionally don’t have author and updated. You’re getting those notices from pages, not from posts. I’m reluctant to add it as it’s no way standard practice to have these on pages.

But if you feel this could hurt your SEO - which I doubt - we should be able to provide a solution for you with some PHP that you can add in your child theme or in a plugin like Code Snippets if you don’t have a child theme.

No, coming from posts as well. Actually i have very few pages, mostly posts.

I didnt know you had fixed for posts… i tried to fix the problem some time ago with a code added to the functions.php (found the code here in the forums).

Weird… :-S Do you think the code i added might be “breaking” the fix?

this was the code:

/**

  • Prints HTML with meta information for the current post-date/time and author.
    */
    function sydney_posted_on() {
    $time_string = ‘<time class=“entry-date published updated” datetime="%1$s">%2$s</time>’;
    if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
    $time_string = ‘<time class=“entry-date published” datetime="%1$s">%2$s</time><time class=“updated” datetime="%3$s">%4$s</time>’;
    }

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )
    );

    $posted_on = sprintf(
    _x( ‘Posted on %s’, ‘post date’, ‘sydney’ ),
    ’ . $time_string . ‘
    );

    $byline = sprintf(
    _x( ‘%s’, ‘post author’, ‘sydney’ ),
    ’<span class=“author post-author”>’ . esc_html( get_the_author() ) . ‘</span>’
    );

    echo ‘<span class=“posted-on post-date updated”>’ . $posted_on . '</span><span class=“byline”> ’ . $byline . ‘</span>’;

    if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    echo ‘<span class=“comments-link”>’;
    comments_popup_link( __( ‘Leave a comment’, ‘sydney’ ), __( ‘1 Comment’, ‘sydney’ ), __( ‘% Comments’, ‘sydney’ ) );
    echo ‘</span>’;
    }

    $categories_list = get_the_category_list( __( ', ', ‘sydney’ ) );
    if ( $categories_list && sydney_categorized_blog() ) {
    printf( ‘<span class=“cat-links”>’ . __( ‘Posted in %1$s’, ‘sydney’ ) . ‘</span>’, $categories_list );
    }
    }

You might need to share some screenshots of the errors you see in Webmaster tools as the structured data testing tool from Google isn’t showing any errors for your site: https://search.google.com/structured-data/testing-tool#url=http%3A%2F%2Fwww.myquirkygifts.com%2Fpink-flamingos-home-decor%2F

So:

  1. The only real issue in the theme was the missing .entry-title which we’ve fixed some time ago;
  2. Posts always had author/updated/published date/etc in the theme. The code you posted simply adds another updated class. Otherwise Sydney is handling this just like official Twenty* themes;
  3. The above doesn’t apply to pages, they just need .entry-title which they already have.

There it goes…

Webmaster

Hey Vlad,

All Posts are missing author and I tried it all to fix it with no success - will love you forever if you find a way of fixing it :slight_smile: :slight_smile:

You see, even the post you tested with live that is in the list “pink-flamingos-home-decor” - I am not quite sure if the live data tool works well, it did not capture other data issues I had (and fixed) either.

Pages are missing author and updated. As you said, its not standard practice to have those in pages - still annoys me having the errors in google webmaster tool. (yeah… yeah… wish we were not so dependable on google). I get it why you don’t want to add the code to fix it in the theme though.

Cheers from Australia,
Rachel

The testing tool can’t be wrong because I see it’s finding the values it needs.

Please find this in the code you posted: <span class=“author post-author”> and change it to <span class=“author post-author vcard”>. This is how it’s done in the theme but it’s missing from your custom code for some reason.
Let me know after your posts get re-detected if the errors go away. Then we can try something custom for posts.

Done. Now we shall wait…

/**

  • Prints HTML with meta information for the current post-date/time and author.
    */
    function sydney_posted_on() {
    $time_string = ‘<time class=“entry-date published updated” datetime="%1$s">%2$s</time>’;
    if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
    $time_string = ‘<time class=“entry-date published” datetime="%1$s">%2$s</time><time class=“updated” datetime="%3$s">%4$s</time>’;
    }

    $time_string = sprintf( $time_string,
    esc_attr( get_the_date( ‘c’ ) ),
    esc_html( get_the_date() ),
    esc_attr( get_the_modified_date( ‘c’ ) ),
    esc_html( get_the_modified_date() )
    );

    $posted_on = sprintf(
    _x( ‘Posted on %s’, ‘post date’, ‘sydney’ ),
    ’ . $time_string . ‘
    );

    $byline = sprintf(
    _x( ‘%s’, ‘post author’, ‘sydney’ ),
    ’<span class=“author post-author vcard”>’ . esc_html( get_the_author() ) . ‘</span>’
    );

    echo ‘<span class=“posted-on post-date updated”>’ . $posted_on . '</span><span class=“byline”> ’ . $byline . ‘</span>’;

    if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    echo ‘<span class=“comments-link”>’;
    comments_popup_link( __( ‘Leave a comment’, ‘sydney’ ), __( ‘1 Comment’, ‘sydney’ ), __( ‘% Comments’, ‘sydney’ ) );
    echo ‘</span>’;
    }

    $categories_list = get_the_category_list( __( ', ', ‘sydney’ ) );
    if ( $categories_list && sydney_categorized_blog() ) {
    printf( ‘<span class=“cat-links”>’ . __( ‘Posted in %1$s’, ‘sydney’ ) . ‘</span>’, $categories_list );
    }
    }

Morning from Australia Vlad,

So Google refreshed the data on 28/04 - error for author in blog posts still there, exactly as the image i attached before.

Any ideas? :-S

Cheers,
Rach

Hi there,

I’m not sure what to tell you. I’ve checked our Sydney demo site in Webmaster tools and we don’t have errors.

I think you should just check the live data for errors. You’ll see that option if you click on one of those posts with issues.

I’m going to show the same example again with the pink flamingos post. In your screenshot it says it’s missing author but if you check the values found by the tool you’ll notice Google finds the author. So it’s not missing.

Hi Rachel
Google recently advised me to add AMP to my website and I use aThemes Sydney so I came across this discussion whilst researching AMP for my theme.

I had a similar issue with my site www.attractionsnearme.co.uk missing post-author etc. but it was easily resolved by installing the ‘DT hAtom WordPress Error Plugin’ I then activated the following settings and Google reported no further problems:

Add hAtom code to Posts
Add hAtom code to Pages
Add hAtom code to Archive Pages
Add hAtom code to Home Static Page - May not be required for your site.

Regards
Dan

Hi Dan,

Thank you! I just found the plugin and installed. No, we shall wait to Google to crawl it again.

About AMP - I have recently installed the pluggin AMP Supremacy - it did create the pages but google keeps returning data structure errors. Will keep searching for something that actually works :-S

Cheers,
Rach

Just posting updates as this might help more people:

Data Structure Errors - Hatom Errors for Posts

Finally fixed, with this plugin:

DT hAtom WordPress Error Plugin

AMP with Sydney Pro
Manage to get it working and being index by google with these plugins:

AMP : https://wordpress.org/plugins/amp/
AMP for WP : https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/

If you are using yoast you will also need:
Glue for Yoast SEO & AMP : https://wordpress.org/plugins/glue-for-yoast-seo-amp/

If you are using cloud flare you will have to disable rocket loader, https rewrite and apps. Found this article teaching how to create rules to configure cloud flare with amp:

Hoping it helps! :slight_smile: