wordpress提示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
<h1 class="title"><?php the_title(); ?></h1>
改為:
<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.//開源軟件:Vevb.com
<span class="date"><?php the_time('Y-m-d'); ?></span>
改為:
<span class="date updated"><?php the_time('Y-m-d'); ?></span>
3,解決 Missing required hCard "author"
<?php the_author(); ?>
改為:
<span class="vcard author"><span class="fn"><?php the_author(); ?></span></span>
文章發表出來,說明我的問題解決了,只不過網上有人說,只需要改single.php就行了,到底是不是自己測試一下.
|
新聞熱點
疑難解答
圖片精選