はじめに|著者情報の構造化がSEO評価を左右する
こんにちは、渡邉国生です。
今回は、WordPressの著者アーカイブページにおいて、Googleの評価基準「E-E-A-T」(経験・専門性・権威性・信頼性)を強化するための実装方法をご紹介します。
特に、構造化データ(JSON-LD)に「肩書き」と「所属組織」を追加することで、検索エンジンに著者の信頼性を明確に伝えることができます。
なぜ著者情報のJSON-LDが重要なのか?
Googleは、コンテンツの品質だけでなく「誰が書いたか」を重視しています。
そのため、著者の名前やプロフィールだけでなく、肩書き(jobTitle
)や所属組織(worksFor
)を構造化データとして明示することで、検索結果での評価向上が期待できます。
ステップ①|WordPressユーザー画面に「肩書き」と「所属組織」を追加する
以下のコードを functions.php
に追加することで、WordPressのユーザー編集画面に入力欄を追加できます。
✔ ユーザー編集画面にカスタムフィールドを追加
// ユーザー編集画面にカスタムフィールドを追加
function add_custom_user_profile_fields($user) {
?>
<h3>追加プロフィール情報</h3>
<table class="form-table">
<tr>
<th><label for="job_title">肩書き (jobTitle)</label></th>
<td>
<input type="text" name="job_title" id="job_title" value="<?php echo esc_attr(get_user_meta($user->ID, 'job_title', true)); ?>" class="regular-text" />
<br /><span class="description">例:代表取締役、編集長など</span>
</td>
</tr>
<tr>
<th><label for="works_for">所属組織名 (worksFor)</label></th>
<td>
<input type="text" name="works_for" id="works_for" value="<?php echo esc_attr(get_user_meta($user->ID, 'works_for', true)); ?>" class="regular-text" />
<br /><span class="description">例:株式会社 一針一歩</span>
</td>
</tr>
</table>
<?php
}
add_action('show_user_profile', 'add_custom_user_profile_fields');
add_action('edit_user_profile', 'add_custom_user_profile_fields');
// 保存処理
function save_custom_user_profile_fields($user_id) {
if (!current_user_can('edit_user', $user_id)) return;
if (isset($_POST['job_title'])) {
update_user_meta($user_id, 'job_title', sanitize_text_field($_POST['job_title']));
}
if (isset($_POST['works_for'])) {
update_user_meta($user_id, 'works_for', sanitize_text_field($_POST['works_for']));
}
}
add_action('personal_options_update', 'save_custom_user_profile_fields');
add_action('edit_user_profile_update', 'save_custom_user_profile_fields');
ステップ②|著者アーカイブページでJSON-LDを出力する
以下のコードを functions.php
に追加することで、著者ページの <head>
に構造化データを挿入できます。
✔ JSON-LD出力コード(肩書き・所属組織対応)
function add_author_archive_jsonld() {
if (is_author()) {
$author = get_queried_object();
if ($author && !is_wp_error($author)) {
$author_id = $author->ID;
$author_name = $author->display_name;
$author_url = get_author_posts_url($author_id);
$author_description = get_the_author_meta('description', $author_id);
$author_avatar = get_avatar_url($author_id);
$author_job_title = get_user_meta($author_id, 'job_title', true);
$author_works_for = get_user_meta($author_id, 'works_for', true);
$json_ld = [
'@context' => 'https://schema.org',
'@type' => 'ProfilePage',
'mainEntity' => [
'@type' => 'Person',
'name' => $author_name,
'url' => $author_url,
'description' => $author_description ? wp_strip_all_tags($author_description) : '',
'image' => $author_avatar,
],
'url' => $author_url,
'name' => $author_name . ' の投稿一覧',
];
if ($author_job_title) {
$json_ld['mainEntity']['jobTitle'] = $author_job_title;
}
if ($author_works_for) {
$json_ld['mainEntity']['worksFor'] = [
'@type' => 'Organization',
'name' => $author_works_for,
'url' => home_url(), // サイトURLを所属組織のURLとして使用
];
}
echo '<script type="application/ld+json">' . PHP_EOL;
echo wp_json_encode($json_ld, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
echo PHP_EOL . '</script>' . PHP_EOL;
}
}
}
add_action('wp_head', 'add_author_archive_jsonld');
実際のJSON-LD出力例
{
"@context": "https://schema.org",
"@type": "ProfilePage",
"mainEntity": {
"@type": "Person",
"name": "渡邉 国生",
"url": "https://example.com/author/watanabe/",
"description": "株式会社一針一歩 代表 / WordPress設計者",
"image": "https://secure.gravatar.com/avatar/xxxxxx?s=96",
"jobTitle": "代表取締役",
"worksFor": {
"@type": "Organization",
"name": "株式会社 一針一歩",
"url": "https://example.com"
}
},
"url": "https://example.com/author/watanabe/",
"name": "渡邉 国生 の投稿一覧"
}
✔ まとめ|E-E-A-T強化は「著者の信頼性設計」から
- Googleは「誰が書いたか」を重視する時代へ
- WordPressでは、著者情報を構造化データで明示することが可能
jobTitle
とworksFor
を追加することで、専門性・権威性・信頼性を強化できる- ユーザー画面で管理できるようにして、運用性も向上
もし、本記事の内容を自社サイトに実装する際の具体的な方法やカスタマイズについてご相談があれば、ぜひお気軽にお問い合わせください。
株式会社一針一歩では、WordPressのバックエンド設計に特化し、信頼性の高いサイト構築をサポートしております。
お客様のサイトに最適なE-E-A-T強化をご提案いたしますので、どうぞご遠慮なくご連絡ください