Structured Data Errors author etc

Hi there,

I’ve been getting the attached errors on SC. I’ve completed all the Schema fields on the X plugin but still getting these errors, any ideas?

Many thanks, Stewart

Hi There,

Thanks for writing in! Could you please try adding the following code into your child theme’s functions.php file. If you don’t have a child theme yet, please follow this guide first (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

//add hatom data
function add_suf_hatom_data($content) {
    $t = get_the_modified_time('F jS, Y');
    $author = get_the_author();
    $title = get_the_title();
    if (( is_front_page() && is_home() ) || is_front_page() || is_home() || is_singular() || is_archive() ) {
        $content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
    }
    return $content;
}
add_filter('the_content', 'add_suf_hatom_data');
add_filter('the_excerpt', 'add_suf_hatom_data');

Hope that helps.

1 Like

Thank you I’ve tried this and have resubmitted hopefully will do the trick :slight_smile:

You’re welcome.

Hi guys sorry no joy with this, any other ideas?

Hi There,

To make a better use of the microformats I suggest that you use the Snippets extension which is bundled with our theme.

Extension - Snippet

That will give better tools to fine tune the microformats.

Cheers!

Thank you but I’ve already got that installed and set up. Any other ideas?

Hi There,

Please provide us with the page URL that you’re having this issue. So that we can take a closer look.

Thanks!

https://www.allwastematters.co.uk

Hello There,

Your changes did not take effect yet since you are on CloudFlare. Please go to your CloudFlare account and purge your site again. After that, please go to Google and do the test again. You will have to make sure that you re index your site again or let Google crawl the fresh cache version of the site or else you will see the same error.

Please let us know if this works out for you.

Hi sorry guys I’ve tried this and still the same issues?

Hey There,

​To assist you better with this issue, would you mind providing us the url of your site with login credentials so we can take a closer look? To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

Thank you.

Hi there,

Thank you for the login information. It seems that you are using another 3rd party plugin and the mixture of our plugin and the 3rd party plugin is causing the issue. You either need to use our plugin or the 3rd party plugin.

If you decide to use our plugin, please purge autoptimize and WPFC cache and deactivate them for few days.

Then go for example to the UK page which you gave the screenshot which has the problem of not having the Author and adds the author name in the snippet box in the page edit screen:

That should do the trick.

Great thanks Chris

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.