Tagged: structured data
- This topic has 4 replies, 2 voices, and was last updated 7 years, 1 month ago by
warmmastering.
-
AuthorPosts
-
August 15, 2016 at 3:02 pm #97269
warmmastering
ParticipantHi, I’ve found that, in the structured data menu of google search console, there are “author” and “updated” errors (both are missing) for pages only, while posts are ok because they have these data.
I’ve found some info about the problem here:
https://kb.yoast.com/kb/fixing-hcard-author-error/Thank you for your great support, regards
Francesco
http://www.warm-mastering.com/August 15, 2016 at 4:14 pm #97276Mahesh
Keymaster@warmmastering: Basically, these data are displayed for post only not for pages so the theme doesn’t include it. But if you do want to have it in pages anyway, it can be done with some customization. For this you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme create a new file
content-page.php
and add the following code into it and save it.<?php /** * The template used for displaying page content in page.php * * @package Catch Themes * @subpackage Gridalicious * @since Gridalicious 0.1 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php /** * gridalicious_before_page_container hook * * @hooked gridalicious_single_content_image - 10 */ do_action( 'gridalicious_before_page_container' ); ?> <div class="entry-container"> <header class="entry-header"> <h1 class="entry-title"><?php the_title(); ?></h1> <?php gridalicious_entry_meta(); ?> </header><!-- .entry-header --> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="pages">' . __( 'Pages:', 'gridalicious' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', ) ); ?> </div><!-- .entry-content --> <?php edit_post_link( __( 'Edit', 'gridalicious' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer>' ); ?> </div><!-- .entry-container --> </article><!-- #post-## -->
Hope this helps. Let me know if any problem.
Regards,
MaheshAugust 15, 2016 at 8:32 pm #97281warmmastering
ParticipantThank you so much Mahesh, I’ll let you know.
RegardsFrancesco
August 16, 2016 at 9:32 am #97311Mahesh
Keymaster@warmmastering: Thank you for your appreciation. Have a nice day!
Regards,
MaheshAugust 17, 2016 at 9:26 pm #97478warmmastering
ParticipantIt works fine Mahesh, thank you very much.
Francesco
-
AuthorPosts
- The topic ‘"Author" and "updated" missing in pages structured data’ is closed to new replies.