Hentry errors in google webmaster tools

I am getting a lot of hentry errors in Google Webmaster tools.

Do you know what could be causing this?
Or how it could be rectified?

Hi There,

Thank you for writing in, please follow the solution provided here

Hope it helps,
Cheers!

Thanks for your suggestion. I have already had code similar to that in my childtheme’s functions.php file for some time but it has not resolved the issues. (Cache has obviously been cleared as the code has been in the file for about a year.

I have provided my existing functions.php code so that you can tell me if there is anything else I should do to fix the issues?

Let me know if you need further information from me.

Hi there,

I wonder if you are using the latest version of the theme and the Snippets plugin. If yes then kindly get back to us with the URL/User/Pass of your website using the Secure Note functionality of the post and give us the errors you encounter in the webmaster tools to follow up the case.

Thank you.

As far as I’m aware everything is up to date on the site. I’ll provide the information you’ve asked for in a secure note below.

Hi there,

The hentry could exist anywhere which means different fix should be needed. I checked your code and it doesn’t contain the fix especially the author and update meta data. You should follow what’s provided here https://theme.co/apex/forum/t/structured-data/6270. Though, since your stack is integrity, then use this code

function x_integrity_entry_meta() {

    //
    // Author.
    //

    $author = sprintf( '<span><i class="x-icon-pencil" data-x-icon="&#xf040;"></i> %s</span>',
      '<span class="author vcard"><span class="fn">'. get_the_author() .'</span></span>'
    );


    //
    // Date.
    //

    $date = sprintf( '<span><time class="entry-date" datetime="%1$s"><i class="x-icon-calendar" data-x-icon="&#xf073;"></i> %2$s</time></span>',
      esc_attr( get_the_date( 'c' ) ),
      '<span class="updated"> '. get_the_modified_time('F jS, Y') .'</span>'
    );


    //
    // Categories.
    //

    if ( get_post_type() == 'x-portfolio' ) {
      if ( has_term( '', 'portfolio-category', NULL ) ) {
        $categories        = get_the_terms( get_the_ID(), 'portfolio-category' );
        $separator         = ', ';
        $categories_output = '';
        foreach ( $categories as $category ) {
          $categories_output .= '<a href="'
                              . get_term_link( $category->slug, 'portfolio-category' )
                              . '" title="'
                              . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                              . '"><i class="x-icon-bookmark" data-x-icon="&#xf02e;"></i> '
                              . $category->name
                              . '</a>'
                              . $separator;
        }

        $categories_list = sprintf( '<span>%s</span>',
          trim( $categories_output, $separator )
        );
      } else {
        $categories_list = '';
      }
    } else {
      $categories        = get_the_category();
      $separator         = ', ';
      $categories_output = '';
      foreach ( $categories as $category ) {
        $categories_output .= '<a href="'
                            . get_category_link( $category->term_id )
                            . '" title="'
                            . esc_attr( sprintf( __( "View all posts in: &ldquo;%s&rdquo;", '__x__' ), $category->name ) )
                            . '"><i class="x-icon-bookmark" data-x-icon="&#xf02e;"></i> '
                            . $category->name
                            . '</a>'
                            . $separator;
      }

      $categories_list = sprintf( '<span>%s</span>',
        trim( $categories_output, $separator )
      );
    }


    //
    // Comments link.
    //

    if ( comments_open() ) {

      $title  = apply_filters( 'x_entry_meta_comments_title', get_the_title() );
      $link   = apply_filters( 'x_entry_meta_comments_link', get_comments_link() );
      $number = apply_filters( 'x_entry_meta_comments_number', get_comments_number() );

	  $text = ( 0 === $number ) ? 'Leave a Comment' : sprintf( _n( '%s Comment', '%s Comments', $number, '__x__' ), $number );

$comments = sprintf( '<span><a href="%1$s" title="%2$s" class="meta-comments"><i class="x-icon-comments" data-x-icon="&#xf086;"></i> %3$s</a></span>',
        esc_url( $link ),
        esc_attr( sprintf( __( 'Leave a comment on: &ldquo;%s&rdquo;', '__x__' ), $title ) ),
        $text
      );

    } else {

      $comments = '';

    }


    //
    // Output.
    //

    if ( x_does_not_need_entry_meta() ) {
      return;
    } else {
      printf( '<p class="p-meta">%1$s%2$s%3$s%4$s</p>',
        $author,
        $date,
        $categories_list,
        $comments
      );
    }

  }

You may replace your existing post meta code for integrity.

Thanks!

Thanks I’ve updated my functions php file now so will need to see if it improves anything within Google over the next few days.

Perfect. Thank you.

I’ve waited a while since updating the functions.php file but there has been no difference in the amount of hentry errors in google search console.
Is there anything else we can try to fix these issues?
I’ll be happy to provide login / FTP access details, if that would help.

Hello There,

I have checked around to look for the url of the site in questions. You have several urls and I could not find out which one. 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.

Thanks I’ll post them in a secure note for you below.

Hi there,

I checked your site and many of the URLs that had errors are now showing the correct markup. Could you please clear your cache plugin? I think what may be happening is that you’re still seeing errors because the crawler is finding cached content.

After clearing the cache, let us know which URLs specifically you’re still seeing errors for and we can look into those.

Hi again, I thought I had cleared the cache when I first made the changes but have just done it again now.

There seem to be quite a few errors caused by Local business info:
“LocalBusiness
2 ERRORS
image - A value for the image field is required.
name - A value for the name field is required.
1 WARNING
priceRange - The priceRange field is recommended. Please provide a value if available.”

I cannot see where this info should go or be entered though?

Is there a way to get Google to recrawl pages to get updated info?

Please give us the URLs of the pages having this issue.

I’m not sure about this:

You will want to contact Google support for a specific answer. Otherwise, just ensure caches are cleared and retest your site in the web master tool.

Thanks.

This is an example of a page / site section showing the errors:

Any help or advice would be very much appreciated.

Hi,

The error has to do with your Contact Info & Map (Jetpack) Widget.

Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

Thank you for your understanding.

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