谷歌:Missing required field entry-title updated hCard author 解决

资源分享评论7K
摘要

谷歌www.google.com:Missing required field entry-title updated hCard author 出现此错误的解决办法

谷歌:Missing required field entry-title updated hCard author 解决

google管理员工具报提取的结构化数据错误,以前都没有的,最近在做blog的手机站,我在想是不是这个引起的。错误如下

错误: Missing required field "entry-title".
错误: Missing required field "updated".
错误: Missing required hCard "author".

1,解决 Missing required field "entry-title"

在标题<?php the_title(); ?>外层加上class entry-title

  1. <h1 class="title"><?php the_title(); ?></h1>

改为

  1. <h1 class="title entry-title"><?php the_title(); ?></h1>

2,解决Missing required field "updated".

在文章发表时间<?php the_time('Y-m-d'); ?>或者<?php the_date();?>外面加上class updated

  1. <span class="date"><?php the_time('Y-m-d'); ?></span>

改为

  1. <span class="date updated"><?php the_time('Y-m-d'); ?></span>

3,解决 Missing required hCard "author"

  1. <?php the_author(); ?>

改为

  1. <span class="vcard author"><span class="fn"><?php the_author(); ?></span></span>

这篇文章发表出来,说明我的问题解决了,只不过网上有人说,只需要改single.php就行了,到底是不是自己测试一下。

网址如下:https://search.google.com/structured-data/testing-tool

谷歌:Missing required field entry-title updated hCard author 解决

提取的结构化数据错误

上图是已经改好了的,只不过是single.php页面,你也可以试试,分布页,首页等。

评论  0  访客  0

发表评论