WordPressサイトを作る場合、Wordpressdデフォルトのテーマを元に、子テーマを作成して使う事も多いと思います。
WordpressデフォルトテーマはWordPressの純正だから間違いないと思うんですよね。
でも、W3Cの仕様に合っているかチェックすると、カスタマイズしていない部分でErrorやWarningが表示されるんですよ。
W3C – Markup Validation Service
ErrorやWarningには無意味な終了タグの存在なども有りますが、SEO的にまずいのは、h1タグが複数箇所で使われているテーマが有る事でしょう。
例えばデフォルトテーマのtwenty twelveを使うと、次の様な ‘Warning’ が出ます。
「トップレベルの見出しとしてのみ、h1要素の使用する様に検討してください。」と注意されるわけです。
h1タグはトップレベルの見出しに1カ所のみ使うと言うのは、SEOでも基本なんですよね?
HTML5になってsection要素やarticle要素ごとにh1タグを置ける様にはなっていますが、Bing Webマスターツールでも修正する様に言ってきますので、h1タグは、まだページに1カ所と考えておいた方が良いと思います。
Index
WordPressのデフォルトテーマのh1要素の数と位置を調べてみる
そこで簡単な投稿ページを作成し、WordPressのデフォルトテーマで表示させて、使われているh1要素の数と位置を調べてみます。
実験ページはこんなの
- Twenty ten
- Twenty Eleven
- Twenty Twelve
- Twenty Thirteen
- Twenty Fourteen
- Twenty Fifteen
- Twenty Sixteen
の7テーマです。
古いデフォルトテーマでは、h1要素が複数有ります。
それぞれのテーマのh1要素の数は、
Twenty ten | 1ケ所 投稿タイトルのみ使用 |
Twenty Eleven | 2ケ所 header内のサイトタイトルと 投稿タイトルで使用 |
Twenty Twelve | 2ケ所 header内のサイトタイトルと 投稿タイトルで使用 |
Twenty Thirteen | 2ケ所 header内のサイトタイトルと 投稿タイトルで使用 |
Twenty Fourteen | 7ケ所 投稿タイトル・サイドカラムの各ウィジェットでも使用 |
Twenty Fifteen | 1ケ所 投稿タイトルのみ使用 |
Twenty Sixteen | 1ケ所 投稿タイトルのみ使用 |
となっています。
‘Twenty ten’ では1カ所だったh1要素が、 ‘Twenty Eleven’ 、 ‘Twenty Twelve’ 、 ‘Twenty Thirteen’ 、 ‘Twenty Fourteen’ では投稿タイトルもh1要素になっていますし、 ‘Twenty Fourteen’ に至っては、サイドカラムの「最近の投稿」「アーカイブ」「カテゴリー」といったウィジェットのタイトル部分迄h1要素になっています。
‘Twenty ten’
1 2 |
<div id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <h1 class="entry-title">テスト投稿</h1> //投稿タイトル部分のみ |
‘Twenty Eleven’
1 2 3 4 5 6 7 8 9 |
<header id="branding" role="banner"> <hgroup> <h1 id="site-title"><span><a href="http://localhost/locomoco/" rel="home">loco実験サイト</a></span></h1> // header内のサイトタイトル <h2 id="site-description">Just another WordPress site</h2> </hgroup> 〜 省略 〜 <article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル |
‘Twenty Twelve’
1 2 3 4 5 6 7 8 9 |
<header id="masthead" class="site-header" role="banner"> <hgroup> <h1 class="site-title"><a href="http://localhost/locomoco/" title="loco実験サイト" rel="home">loco実験サイト</a></h1> // header内のサイトタイトル <h2 class="site-description">Just another WordPress site</h2> </hgroup> 〜 省略 〜 <article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル |
‘Twenty Thirteen’
1 2 3 4 5 6 7 8 9 |
<header id="masthead" class="site-header" role="banner"> <a class="home-link" href="http://localhost/locomoco/" title="loco実験サイト" rel="home"> <h1 class="site-title">loco実験サイト</h1> // header内のサイトタイトル <h2 class="site-description">Just another WordPress site</h2> </a> 〜 省略 〜 <article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル |
‘Twenty Fourteen’
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<body class="single single-post postid-9 single-format-standard logged-in admin-bar no-customize-support masthead-fixed full-width singular"> <div id="page" class="hfeed site"> <header id="masthead" class="site-header" role="banner"> <div class="header-main"> <h1 class="site-title"><a href="http://localhost/locomoco/" rel="home">loco実験サイト</a></h1> // header内のサイトタイトル 〜 省略 〜 <article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル 〜 省略 〜 <div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary"> 〜 省略 〜 <aside id="recent-posts-2" class="widget widget_recent_entries"> <h1 class="widget-title">最近の投稿</h1> // サイドカラムのウィジェットタイトル 〜 省略 〜 <aside id="recent-comments-2" class="widget widget_recent_comments"> <h1 class="widget-title">最近のコメント</h1> // サイドカラムのウィジェットタイトル 〜 省略 〜 <aside id="archives-2" class="widget widget_archive"> <h1 class="widget-title">アーカイブ</h1> // サイドカラムのウィジェットタイトル 〜 省略 〜 <aside id="categories-2" class="widget widget_categories"> <h1 class="widget-title">カテゴリー</h1> // サイドカラムのウィジェットタイトル 〜 省略 〜 <aside id="meta-2" class="widget widget_meta"> <h1 class="widget-title">メタ情報</h1> // サイドカラムのウィジェットタイトル |
‘Twenty Fifteen’
1 2 3 |
<article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル |
‘Twenty Sixteen’
1 2 3 |
<article id="post-9" class="post-9 post type-post status-publish format-standard hentry category-1"> <header class="entry-header"> <h1 class="entry-title">テスト投稿</h1> // 投稿タイトル |
‘Twenty ten’ で1ケ所だったh1要素は、’Twenty Eleven’ 、 ‘Twenty Twelve’ 、 ‘Twenty Thirteen’ 、 ‘Twenty Fourteen’で増えたのはhtml5の書式に合わせたからでしょうか。
ずいぶん前からWordPressはSEOに強いと言われていますが、h1要素だけ見た場合、それが言えるのは ‘Twenty Sixteen’ を含め ’Twenty Fifteen’ 以降になるんじゃないでしょうか?
投稿記事内のh2・h3・h4要素のタグ名変更も必要なんです。
しかし’Twenty Fifteen’ や ‘Twenty Sixteen’ が良いと言っても、投稿タイトルがh1要素として表示されるテーマで投稿をしていたサイトは、簡単にはテーマを変更できません。
投稿テーマがh1要素がh2要素になった分、h2要素の中にh2要素が配置されない様に、投稿記事内のh2要素をh3要素に、h3要素をh4要素にと修正してやらなければいけません。今迄の投稿を全てチェックして修正すると言うのは、かなりの覚悟が必要です(私がそうでした)。
信頼のブランドも、自分の目で確認する事が必要なのですね。