質問編集履歴
1
$taxonomy_slugの違いを修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
いったいどこが間違っているのでしょうか!?
|
27
27
|
|
28
28
|
<?php // 投稿に紐づくタームの一覧を表示
|
29
|
-
$taxonomy_slug = '
|
29
|
+
$taxonomy_slug = 'area'; // 任意のタクソノミースラッグを指定
|
30
30
|
$category_terms = wp_get_object_terms($post->ID, $taxonomy_slug); // タームの情報を取得
|
31
31
|
if(!empty($category_terms)){ // 変数が空でなければ true
|
32
32
|
if(!is_wp_error($category_terms)){ // 変数が WordPress Error でなければ true
|