Written by Anonymous
//header-twitter-card.php
if ( is_category() ) {//カテゴリ用設定
$description = get_category_meta_description();
if ($category_title = get_category_title(get_query_var('cat'))) {
$title = $category_title;
} else {
$title = wp_title(null, false).' | '.get_bloginfo('name');
}
$url = generate_canonical_url();
}
if ( is_tag() ) {//タグ用設定
$description = get_tag_meta_description();
if ($tag_title = get_tag_title(get_query_var('tag_id'))) {
$title = $tag_title;
} else {
$title = wp_title(null, false).' | '.get_bloginfo('name');
}
$url = generate_canonical_url();
}
...
if (is_category() && !is_paged() && $eye_catch = get_category_eye_catch(get_query_var('cat'))) {
$ogp_image = $eye_catch;
} elseif (is_tag() && !is_paged() && $eye_catch = get_tag_eye_catch(get_query_var('tag_id'))) {
$ogp_image = $eye_catch;
} elseif ( get_ogp_home_image_url() ) {