Tagged: x
-
AuthorPosts
-
November 11, 2016 at 4:02 am #1253071
I tried following the instructions in this post: https://community.theme.co/forums/topic/how-to-resolve-hentry-markup-errors/ to rectify hentry markup errors in Google Search console but they do not seem to have worked.
Do you have more up to date instructions to fix these issues?
My site is eyetooth-art.co.uk. Please let me know if you need logins for the site.
I’d also like to know how to implement schema on my site so any info you can give me on how to do that would also be appreciated.
Thanks,
SteveNovember 11, 2016 at 7:11 am #1253275Hi Steve,
Thanks for posting in.
The hentry isn’t required in all places, but WordPress can add them whenever the post_class() is called. The solution is removing it, but that will also remove the styling and structure that are already applied to it.
Hence, we have to be selective to which and when it should be removed. The solutions may vary, would you mind providing your site’s URL that has this issue? I like to gather information first, like what stack and element’s triggering the hentry.
Schema is a big implementation, the application of its standard may vary too, like where you wish to implement and data you wish to display. X theme is schema ready, but just the basic one. And if you wish to implement all other schema standards, then you may consult it to your webmaster/developer. Optimization depends on the information you wish to display.
Thanks!
November 11, 2016 at 7:58 am #1253319Thanks for getting back to me. I will send my site info and logins to you shortly via a private message.
My site is: http://eyetooth-art.co.uk/With regards to the schema: I would like to implement the following:
WebSite
Markup: schema.orgReview
Markup: schema.orgOrganization
Markup: schema.orgNovember 11, 2016 at 8:00 am #1253320This reply has been marked as private.November 11, 2016 at 8:01 pm #1254093Hi there,
Are you still getting the henry errors? After doing tests, it began to work which could be related to caching. I don’t see any error anymore. Or perhaps, it’s specific to a page? Please provide the exact URL.
The Website and Organization schema are also applied without error. While the review schema is only available for existing comments or product reviews. And there is one error which can be fixed,
datetime=
16/06/2016 at 13:47 (The property datetime= is not recognized by Google for an object of type Review.)To fix that review schema error, please add this code to your child theme’s functions.php
function x_integrity_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : // 1 case 'trackback' : // 1 ?> <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> <p><?php _e( 'Pingback:', '__x__' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( '(Edit)', '__x__' ), '<span class="edit-link">', '</span>' ); ?></p> <?php break; default : // 2 GLOBAL $post; if ( X_WOOCOMMERCE_IS_ACTIVE ) : $rating = esc_attr( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); endif; $avatar_variation = ( x_is_product() ) ? ' x-img-thumbnail' : ''; ?> <li id="li-comment-<?php comment_ID(); ?>" itemprop="review" itemscope itemtype="http://schema.org/Review" <?php comment_class(); ?>> <?php printf( '<div class="x-comment-img">%1$s %2$s</div>', '<span class="avatar-wrap cf' . $avatar_variation . '">' . get_avatar( $comment, 120 ) . '</span>', ( $comment->user_id === $post->post_author ) ? '<span class="bypostauthor">' . __( 'Post<br>Author', '__x__' ) . '</span>' : '' ); ?> <article id="comment-<?php comment_ID(); ?>" class="comment"> <header class="x-comment-header"> <?php printf( '<cite class="x-comment-author" itemprop="author">%1$s</cite>', get_comment_author_link() ); printf( '<div><a href="%1$s" class="x-comment-time"><time itemprop="datePublished" datetime="%2$s">%3$s</time></a></div>', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( __( '%1$s at %2$s', '__x__' ), get_comment_date(), get_comment_time() ) ); edit_comment_link( __( '<i class="x-icon-edit" data-x-icon=""></i> Edit', '__x__' ) ); ?> <?php if ( x_is_product() && get_option('woocommerce_enable_review_rating') == 'yes' ) : ?> <div class="star-rating-container"> <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating" class="star-rating" title="<?php echo sprintf( __( 'Rated %d out of 5', '__x__' ), $rating ) ?>"> <span style="width:<?php echo ( intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ) / 5 ) * 100; ?>%"><strong itemprop="ratingValue"><?php echo intval( get_comment_meta( $GLOBALS['comment']->comment_ID, 'rating', true ) ); ?></strong> <?php _e( 'out of 5', '__x__' ); ?></span> </div> </div> <?php endif; ?> </header> <?php if ( '0' == $comment->comment_approved ) : ?> <p class="x-comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', '__x__' ); ?></p> <?php endif; ?> <section class="x-comment-content" itemprop="description"> <?php comment_text(); ?> </section> <?php if ( ! x_is_product() ) : ?> <div class="x-reply"> <?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span class="comment-reply-link-after"><i class="x-icon-reply" data-x-icon=""></i></span>', '__x__' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> </div> <?php endif; ?> </article> <?php break; endswitch; }
Thanks!
November 14, 2016 at 4:53 am #1256189This reply has been marked as private.November 14, 2016 at 7:06 pm #1257304This reply has been marked as private.November 15, 2016 at 2:55 am #1257628I have cleared the website cache numerous times now and it’s still displaying the errors. I’ll wait a few more days to see if it corrects itself.
Thanks again for your help.
November 15, 2016 at 7:18 am #1257863You are welcome,
Let us know if you need further help.
Joao
November 23, 2016 at 11:43 am #1268467Hi Joao,
I am still experiencing issues with this. I have cleared the cache of my site so many timesa nd even completely disabled the cahcing plugins for a few days but the errors are still showing in Google Search Console.
I have also tried ‘fetching the pages as google’ but nothing is making these errors go away.
Is there anything else we can try to fix this?
Cheers.
November 23, 2016 at 8:08 pm #1269011Hi there,
I tried again and I really can’t see those error. Maybe it’s specific to location? Or maybe I’m testing it differently? Please provide a video recording.
Now matter what I tried, I’m not getting hentry errors in my view.
Thanks!
November 24, 2016 at 9:04 am #1269599I would like to try the code you pasted above (#1254093) on another site I’ve built using X but using the ‘icon’ stack. Will the code still be relevant, or does it need to be edited.
Maybe trying to fix the Hentry and Schema errors on another site will shed some light on what’s causing the issues.
The site I’d like to fix the issues on is: https://engagecon.co.uk/
Please let me know if you need any login details etc to be able to help.
Thanks,
SteveNovember 24, 2016 at 3:22 pm #1269877Hi Steve,
I can check that, please provide the login credentials and the page that needs testing.
Thanks!
November 25, 2016 at 3:42 am #1270347This reply has been marked as private.November 25, 2016 at 8:06 am #1270531 -
AuthorPosts