SEO は奥が深いですね。
まさか Google が class=”updated” の要素を要求していて、なければエラーとしてページ表示順位に関わるとは。
Twenty Twelve のテーマをベースにしていたのですが、その手のエラーは『updated がありません』のみのようでしたが、修正後に『ノードが空です』ですという警告が出たため、それも修正しています。
author の n というノードが空だったので、n を消しています。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function twentytwelve_entry_meta() { // Translators: used between list items, there is a space after the comma. $categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) ); // Translators: used between list items, there is a space after the comma. $tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) ); $date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); $author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ), get_the_author() ); |
このコードから以下の修正をしています。
- 『class=”entry-date”』を『class=”entry-date updated”』に修正。
- 『class=”url fn n”』を『class=”url fn”』に修正。