Title: 各カテゴリのアイキャッチとリンクを挿入する方法
Last modified: 2016年9月28日

---

# 各カテゴリのアイキャッチとリンクを挿入する方法

 *  解決済 [gblinngy](https://ja.wordpress.org/support/users/gblinngy/)
 * (@gblinngy)
 * [10年、 8ヶ月前](https://ja.wordpress.org/support/topic/%e5%90%84%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%81%ae%e3%82%a2%e3%82%a4%e3%82%ad%e3%83%a3%e3%83%83%e3%83%81%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e6%96%b9/)
 * 表題の件につきまして、お力をかしてください。
    （当方、まったくPHPに詳しくありま
   せん。。。）
 * 下記の子カテゴリのアーカイブページで、
    配下の各孫カテゴリのアイキャッチとリンク
   の一覧を表示したいです。
 * ＜構造＞
    親カテゴリ └子カテゴリ(A） 　├孫カテゴリA-1 　└孫カテゴリA-2 └子カテゴリ(
   B） 　├孫カテゴリB-1（B-1） 　└孫カテゴリB-1（B-2)
 * リンクとカテゴリ名は下記のコードで出力することが出来たのですが、
    アイキャッチ
   をどのように出力したら全くわからず困り果てています。
 *     ```
       <?php
       $term_id = get_query_var('cat');;
       $taxonomy_name = 'category';
       $termchildren = get_term_children( $term_id, $taxonomy_name );
   
       echo '<ul class="proList clearfix">';
       foreach ( $termchildren as $child ) {
       	$term = get_term_by( 'id', $child, $taxonomy_name );
       	echo '<li><p class="proImgList"><a href="' . get_term_link( $child, $taxonomy_name ) . '">画像</a><p>';
       	echo '<p class="proTxtList"><a href="' . get_term_link( $child, $taxonomy_name ) . '">' . $term->name . '</a></p></li>';
       }
       echo '</ul>';
       ?>
       ```
   
 * ※上記の「画像」となっているところに、各カテゴリのアイキャッチを入れたいです。
 * アイキャッチはAdvanced Custom Fieldsで画像を登録出来るようにしたのですが、どう
   出力したら良いのかさっぱりで。。。
 * どうぞお力を貸してください。
    よろしくお願いいたします。

1件の返信を表示中 - 1 - 1件目 (全1件中)

 *  トピック投稿者 [gblinngy](https://ja.wordpress.org/support/users/gblinngy/)
 * (@gblinngy)
 * [10年、 8ヶ月前](https://ja.wordpress.org/support/topic/%e5%90%84%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%81%ae%e3%82%a2%e3%82%a4%e3%82%ad%e3%83%a3%e3%83%83%e3%83%81%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e6%96%b9/#post-184142)
 * すみません。投稿が被ってしまったので、こちらはCloseいたします

1件の返信を表示中 - 1 - 1件目 (全1件中)

 トピック「各カテゴリのアイキャッチとリンクを挿入する方法」には新たに返信すること
はできません。

## タグ

 * [アイキャッチ](https://ja.wordpress.org/support/topic-tag/%e3%82%a2%e3%82%a4%e3%82%ad%e3%83%a3%e3%83%83%e3%83%81/)
 * [管理者へ連絡](https://ja.wordpress.org/support/topic-tag/%e7%ae%a1%e7%90%86%e8%80%85%e3%81%b8%e9%80%a3%e7%b5%a1/)
 * [出力](https://ja.wordpress.org/support/topic-tag/%e5%87%ba%e5%8a%9b/)
 * [子カテゴリ](https://ja.wordpress.org/support/topic-tag/%e5%ad%90%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa/)

 * フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1件の返信
 * 1人の参加者
 * 最後の返信者: [gblinngy](https://ja.wordpress.org/support/users/gblinngy/)
 * 最後の活動: [10年、 8ヶ月前](https://ja.wordpress.org/support/topic/%e5%90%84%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%81%ae%e3%82%a2%e3%82%a4%e3%82%ad%e3%83%a3%e3%83%83%e3%83%81%e3%81%a8%e3%83%aa%e3%83%b3%e3%82%af%e3%82%92%e6%8c%bf%e5%85%a5%e3%81%99%e3%82%8b%e6%96%b9/#post-184142)
 * 状態: 解決済

## トピック

### 人気のトピック

### 返信がないトピック

### サポート関連ではないトピック

### 解決済みのトピック

### 未解決のトピック

### すべてのトピック
