Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #97269
    warmmastering
    Participant

    Hi, 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/

    #97276
    Mahesh
    Participant

    @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,
    Mahesh

    #97281
    warmmastering
    Participant

    Thank you so much Mahesh, I’ll let you know.
    Regards

    Francesco

    #97311
    Mahesh
    Participant

    @warmmastering: Thank you for your appreciation. Have a nice day!

    Regards,
    Mahesh

    #97478
    warmmastering
    Participant

    It works fine Mahesh, thank you very much.

    Francesco

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘"Author" and "updated" missing in pages structured data’ is closed to new replies.