Title: pluto1234の返信 - page 2 | WordPress.org 日本語

---

# pluto1234

  [  ](https://ja.wordpress.org/support/users/pluto1234/)

 *   [プロフィール](https://ja.wordpress.org/support/users/pluto1234/)
 *   [作成したトピック](https://ja.wordpress.org/support/users/pluto1234/topics/)
 *   [作成した返信](https://ja.wordpress.org/support/users/pluto1234/replies/)
 *   [返信したトピック](https://ja.wordpress.org/support/users/pluto1234/replied-to/)
 *   [エンゲージメント](https://ja.wordpress.org/support/users/pluto1234/engagements/)
 *   [お気に入り](https://ja.wordpress.org/support/users/pluto1234/favorites/)

 返信を検索

## フォーラムへの返信

15件の返信を表示中 - 16 - 30件目 (全327件中)

[←](https://ja.wordpress.org/support/users/pluto1234/replies/?output_format=md) 
[1](https://ja.wordpress.org/support/users/pluto1234/replies/?output_format=md) 
2 [3](https://ja.wordpress.org/support/users/pluto1234/replies/page/3/?output_format=md)…
[20](https://ja.wordpress.org/support/users/pluto1234/replies/page/20/?output_format=md)
[21](https://ja.wordpress.org/support/users/pluto1234/replies/page/21/?output_format=md)
[22](https://ja.wordpress.org/support/users/pluto1234/replies/page/22/?output_format=md)
[→](https://ja.wordpress.org/support/users/pluto1234/replies/page/3/?output_format=md)

 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [プラグインを使わずに人気記事を表示したい](https://ja.wordpress.org/support/topic/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%ab%e4%ba%ba%e6%b0%97%e8%a8%98%e4%ba%8b%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%ab%e4%ba%ba%e6%b0%97%e8%a8%98%e4%ba%8b%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/#post-162333)
 * [http://ja.forums.wordpress.org/topic/5294?replies=6](http://ja.forums.wordpress.org/topic/5294?replies=6)
 * ここに、WP-PostViews でカウントアップした値（値はカスタムフィールド ‘views’ に
   保存される）を使って、ランキングする方法が載っています。
 * WP-PostViews：カウントアップのために使用
    ランキング表示部：自由にカスタマイズ
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [プラグインを使わずに人気記事を表示したい](https://ja.wordpress.org/support/topic/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%ab%e4%ba%ba%e6%b0%97%e8%a8%98%e4%ba%8b%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%82%92%e4%bd%bf%e3%82%8f%e3%81%9a%e3%81%ab%e4%ba%ba%e6%b0%97%e8%a8%98%e4%ba%8b%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%97%e3%81%9f%e3%81%84/#post-162327)
 * 素直に get_posts() を使った方が良いと思います。この場合、人気＝コメントの多い
   順です。
    ★ functions.php
 *     ```
       function comments_rank_where( $where = '' ) {
         $where .= " AND comment_count > 0";
         return $where;
       }
       ```
   
 *     ```
       <?php
       global $post;
       $args = array(
         'orderby'          => 'comment_count',
         'order'            => 'DESC',
         'suppress_filters' => false,
         'numberposts'      => 3
       );
       add_filter( 'posts_where' , 'comments_rank_where' , 10 , 1 );
       $my_posts = get_posts( $args );
       remove_filter( 'posts_where', 'comments_rank_where' );
       if ($my_posts) :
         echo '<ul>'.PHP_EOL;
         foreach ($my_posts as $post) :
           setup_postdata($post);
           $commentcount = $post->comment_count;
       ?>
           <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>　<?php echo $commentcount; ?></li>
       <?php
         endforeach;
         wp_reset_postdata();
         echo '</ul>'.PHP_EOL;
       endif;
       ?>
       ```
   
 * ※ Popular Posts や Post Views は、コメントの多さで人気を決めているのではないと
   思いますが・・。
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [カスタム投稿タイプにて、特定のターム除外およびページネーションする](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e6%8a%95%e7%a8%bf%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e3%81%a6%e3%80%81%e7%89%b9%e5%ae%9a%e3%81%ae%e3%82%bf%e3%83%bc%e3%83%a0%e9%99%a4%e5%a4%96%e3%81%8a%e3%82%88/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e6%8a%95%e7%a8%bf%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e3%81%a6%e3%80%81%e7%89%b9%e5%ae%9a%e3%81%ae%e3%82%bf%e3%83%bc%e3%83%a0%e9%99%a4%e5%a4%96%e3%81%8a%e3%82%88/#post-162326)
 * 引数に ‘paged’ の指定がないからでは？
 *     ```
       <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
       <?php
       $args=array(
           'tax_query' => array(
               array(
                   'taxonomy' => 'タクソノミー名',
                   'field' => 'slug', //ターム名をスラッグで指定する
                   'terms' => array( 'cat00','cat05','cat06','cat07' ) //表示したいタームをスラッグで指定
               )
           ),
           'post_type'       => 'カスタム投稿タイプ名',
           'paged'           => $paged, // ★★★
           'posts_per_page'  => 3 //表示件数（-1で全ての記事を表示）
       );
       ?>
       <?php query_posts( $args ); ?>
       <?php if (have_posts()) : ?>
           <?php while (have_posts()) :the_post(); ?>
            　... 内容 ...
           <?php endwhile; ?>
           <?php wp_pagenavi(); ?>
       <?php endif; ?>
       ```
   
 *   フォーラム: [プラグイン](https://ja.wordpress.org/support/forum/plugins/)
    
   返信が含まれるトピック: [Advanced Custom Fields Repeater Fieldで投稿がない場合の処理](https://ja.wordpress.org/support/topic/advanced-custom-fields-repeater-field%e3%81%a7%e6%8a%95%e7%a8%bf%e3%81%8c%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e5%87%a6%e7%90%86/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/advanced-custom-fields-repeater-field%e3%81%a7%e6%8a%95%e7%a8%bf%e3%81%8c%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e5%87%a6%e7%90%86/#post-162321)
 *     ```
       <?php if(get_field('親フィールド')): ?>
           <ul>
           <?php while( has_sub_field('親フィールド') ): ?>
               <?php
               $url = get_sub_field('子フィールド1');
               $title = get_sub_field('子フィールド2');
               ?>
               <?php if (empty($url)) : ?>
                   <?php if (empty($title)) :  ?> <!-- どちらもなし -->
                       <li></li>
                   <?php else : ?>                <!-- タイトルの入力のみ-->
                       <li><?php echo $title; ?></li>
                   <?php endif; ?>
               <?php else : ?>
                   <?php if (empty($title)) : ?>  <!-- URLの入力のみ -->
                       <li><img src="<?php echo $url; ?>" /></li>
                   <?php else : ?>                <!-- 両方入力 -->
                       <li><img src="<?php echo $url; ?>" /><?php echo $title; ?></li>
                   <?php endif; ?>
               <?php endif; ?>
           <?php endwhile; ?>
           </ul>
       <?php else : ?>
           <!-- 入力なし -->
       <?php endif; ?>
       ```
   
 *   フォーラム: [プラグイン](https://ja.wordpress.org/support/forum/plugins/)
    
   返信が含まれるトピック: [Advanced Custom Fields Repeater Fieldで投稿がない場合の処理](https://ja.wordpress.org/support/topic/advanced-custom-fields-repeater-field%e3%81%a7%e6%8a%95%e7%a8%bf%e3%81%8c%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e5%87%a6%e7%90%86/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/advanced-custom-fields-repeater-field%e3%81%a7%e6%8a%95%e7%a8%bf%e3%81%8c%e3%81%aa%e3%81%84%e5%a0%b4%e5%90%88%e3%81%ae%e5%87%a6%e7%90%86/#post-162319)
 * 「子フィールドの入力が一つもない」ときは、それで合ってます。
    しかし、質問の意図
   は違うと思われます。
 * 「子フィールドに入力がなかった場合」というのは、
    1) 子フィールド1 の入力がない
   2) 子フィールド2 の入力がない 3) 子フィールド1 または 子フィールド2 どちらかの
   入力がない 4) 子フィールド1 と 子フィールド2 どちらも入力がない のいずれの条件
   になりますか？
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [最新1件全文表示・その他リスト表示の際のdlタグの開始・閉じタグの](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/#post-162314)
 * そこは、さっき修正を追加しておきました。
 * それにしても
 *     ```
       <?php if (get_query_var($taxonomy_name) == 1) : ?>
       ```
   
 * は、まったくおかしいです。
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [最新1件全文表示・その他リスト表示の際のdlタグの開始・閉じタグの](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/#post-162312)
 * タクソノミー名なら
 *     ```
       <?php
       $query_obj = get_queried_object();
       $taxonomy_obj = get_taxonomy($query_obj->taxonomy);
       echo esc_html($taxonomy_obj->label);
       ?>
       ```
   
 * ターム名なら
 *     ```
       <?php single_term_title(); ?>
       もしくは、
       <?php
       $query_obj = get_queried_object();
       echo esc_html($query_obj->name);
       ?>
       ```
   
 * 修正
 *     ```
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       <?php if(have_posts()): ?>
           <?php if ($paged == 1) : ?>
       　　　　　：
       ```
   
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [最新1件全文表示・その他リスト表示の際のdlタグの開始・閉じタグの](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e6%9c%80%e6%96%b01%e4%bb%b6%e5%85%a8%e6%96%87%e8%a1%a8%e7%a4%ba%e3%83%bb%e3%81%9d%e3%81%ae%e4%bb%96%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%ae%e9%9a%9b%e3%81%aedl%e3%82%bf%e3%82%b0/#post-162302)
 * 先頭と２番目以降を分けただけです。
 *     ```
       <?php if(have_posts()): the_post(); ?>
       	<?php if( $attachment_id = get_field('top_banner_img') ): ?>
       		<?php
       		$attachment = get_post( $attachment_id );
       		$size = "full"; // (thumbnail, medium, large, full or custom size)
       		$image = wp_get_attachment_image_src( $attachment_id, $size );
       		$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
       		$image_title = $attachment->post_title;
       		?>
       		<img src="<?php echo $image[0]; ?>" alt="<?php echo $alt; ?>" title="<?php echo $image_title; ?>" width="250" />
       	<?php else : ?>
       		<?php the_post_thumbnail(array(250,250)); ?>
       	<?php endif; ?>
       	<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
       	<?php the_time("Y.n.j") ?>
       	<p><?php echo mb_substr(get_the_content(), 0, 150).'...'; ?></p>
       <?php endif; ?>
   
       <?php if(have_posts()): ?>
       	<dl class="newEntry">
       	<?php while(have_posts()): the_post(); ?>
       		<dt><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><span><?php the_time("Y.n.j") ?></span></dt>
       		<dd><?php the_excerpt(); ?></dd>
       	<?php endwhile; ?>
       	</dl>
       <?php endif; ?>
       ```
   
 * ページネーションを付けることを考えると、こちらの方がいいかもしれません。
 *     ```
       <?php if(have_posts()): ?>
           <?php if (get_query_var('paged') == 1) : ?>
       	<?php the_post(); ?>
       	<?php if( $attachment_id = get_field('top_banner_img') ): ?>
                   <?php
                   $attachment = get_post( $attachment_id );
                   $size = "full"; // (thumbnail, medium, large, full or custom size)
                   $image = wp_get_attachment_image_src( $attachment_id, $size );
                   $alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
                   $image_title = $attachment->post_title;
                   ?>
                   <img src="<?php echo $image[0]; ?>" alt="<?php echo $alt; ?>" title="<?php echo $image_title; ?>" width="250" />
       	<?php else : ?>
                   <?php the_post_thumbnail(array(250,250)); ?>
       	<?php endif; ?>
       	<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
       	<?php the_time("Y.n.j") ?>
       	<p><?php echo mb_substr(get_the_content(), 0, 150).'...'; ?></p>
           <?php endif; ?>
   
           <?php if(have_posts()): ?>
               <dl class="newEntry">
               <?php while(have_posts()): the_post(); ?>
                   <dt><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><span><?php the_time("Y.n.j") ?></span></dt>
                   <dd><?php the_excerpt(); ?></dd>
               <?php endwhile; ?>
               </dl>
           <?php endif; ?>
           <!-- ページネーション -->
       <?php endif; ?>
       ```
   
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [特定のポストタイプに属する記事一覧にカスタムフィールドの画像を表示](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/#post-162277)
 * >以下のように変数に置き換えれば良い。という意味合いでしょうか？
    そうです。 今
   の時代はコンピュータは高速で、特に Web の場合は、PHP をちょっと変更ところで、
   全体的なパフォーマンスに影響はありませんが・・。1マイクロ秒くらいは速くなるかも
   しれません。
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [特定のポストタイプに属する記事一覧にカスタムフィールドの画像を表示](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/#post-162272)
 * その他、幾つか気になったので書いておきます。
    1) if($the_query->have_posts()):
   が重なっています。 2) 閉じる方の /ul が足りません。 3) 最後は、wp_reset_postdata();
   で十分です（$wp_query は破壊していないので）。
 *     ```
       <?php
       $args = array(
       	'post_type' => 'article',
       	'showposts' => 4,
       	);
       ?>
       <?php $the_query = new WP_Query( $args ); ?>
       <?php if($the_query->have_posts()): ?>
       	<ul class="newlistDouble">
       	<?php while($the_query->have_posts()):$the_query->the_post(); ?>
   
       <li><a>">
       	<?php if( get_field('top_banner_img') ): ?>
       	<?php
       		$attachment_id = get_field('top_banner_img');
       		$size = "full"; // (thumbnail, medium, large, full or custom size)
       		$image = wp_get_attachment_image_src( $attachment_id, $size );
       		$attachment = get_post( get_field('top_banner_img') );
       		$alt = get_post_meta($attachment->ID, '_wp_attachment_image_alt', true);
       		$image_title = $attachment->post_title;
       	?>
       	<img src="<?php echo $image[0]; ?>" alt="<?php echo $alt; ?>" title="<?php echo $image_title; ?>" />
       	<?php else : ?>
       	<?php the_post_thumbnail(array(115,115)); ?>
       	<?php endif; ?>
   
       	</a><span><a>"><?php echo mb_substr($post->post_title, 0, 25).'...'; ?></a></span><?php echo mb_substr(get_the_excerpt(), 0, 50).'...'; ?></li>
       	<?php endwhile;  ?>
               </ul>
       <?php endif; ?>
       <?php wp_reset_postdata(); ?>
       ```
   
 * ※追加：get_field(‘top_banner_img’) を何度も呼び出していますが、１回呼び出せば
   いいはずです。
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [wp_list_categoriesのカテゴリーという文字を消したい。](https://ja.wordpress.org/support/topic/wp_list_categories%e3%81%ae%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%a8%e3%81%84%e3%81%86%e6%96%87%e5%ad%97%e3%82%92%e6%b6%88%e3%81%97%e3%81%9f%e3%81%84%e3%80%82/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/wp_list_categories%e3%81%ae%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%a8%e3%81%84%e3%81%86%e6%96%87%e5%ad%97%e3%82%92%e6%b6%88%e3%81%97%e3%81%9f%e3%81%84%e3%80%82/#post-162266)
 * テキトウに書いても PHP は動きません。
 * $args に複数の引数を指定する方法は（複数あるのが普通）、
    [http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0/wp_list_categories](http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0/wp_list_categories)
   にサンプルが載っています。
 *   フォーラム: [テーマ](https://ja.wordpress.org/support/forum/themes/)
    返信が
   含まれるトピック: [カテゴリをリスト表示する際に親と子でクラスを分けたい。](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%82%92%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%e9%9a%9b%e3%81%ab%e8%a6%aa%e3%81%a8%e5%ad%90%e3%81%a7%e3%82%af%e3%83%a9%e3%82%b9%e3%82%92/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%82%92%e3%83%aa%e3%82%b9%e3%83%88%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%e9%9a%9b%e3%81%ab%e8%a6%aa%e3%81%a8%e5%ad%90%e3%81%a7%e3%82%af%e3%83%a9%e3%82%b9%e3%82%92/#post-162251)
 * wp_list_categories() で ‘walker’ を使えば良いと思います。
    [http://ja.forums.wordpress.org/topic/10238?replies=5](http://ja.forums.wordpress.org/topic/10238?replies=5)
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [特定のポストタイプに属する記事一覧にカスタムフィールドの画像を表示](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%9d%e3%82%b9%e3%83%88%e3%82%bf%e3%82%a4%e3%83%97%e3%81%ab%e5%b1%9e%e3%81%99%e3%82%8b%e8%a8%98%e4%ba%8b%e4%b8%80%e8%a6%a7%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0/#post-162241)
 * このコードは、どこに書いているのですか？本当に index.php ですか？sidebar.php 
   とかじゃないですか？
 * index.php なら、きちんとポストIDが入っているか調べてみてください。
 *     ```
       echo $post->ID;
       $attachment_id = get_field('top_banner_img',$post->ID);
       echo $attachment_id;
       ```
   
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [WP_Queryでwp_pagenaviが2ページ目から404エラーになります](https://ja.wordpress.org/support/topic/wp_query%e3%81%a7wp_pagenavi%e3%81%8c2%e3%83%9a%e3%83%bc%e3%82%b8%e7%9b%ae%e3%81%8b%e3%82%89404%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%99/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/wp_query%e3%81%a7wp_pagenavi%e3%81%8c2%e3%83%9a%e3%83%bc%e3%82%b8%e7%9b%ae%e3%81%8b%e3%82%89404%e3%82%a8%e3%83%a9%e3%83%bc%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%99/#post-162173)
 * $paged の設定は？ここでは、書いていないだけ？
    関係ないですが、’post_category’
   なんて指定ありましたっけ？
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [カスタム分類の記事詳細ページの作り方について](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e5%88%86%e9%a1%9e%e3%81%ae%e8%a8%98%e4%ba%8b%e8%a9%b3%e7%b4%b0%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e4%bd%9c%e3%82%8a%e6%96%b9%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/)
 *  [pluto1234](https://ja.wordpress.org/support/users/pluto1234/)
 * (@pluto1234)
 * [13年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e5%88%86%e9%a1%9e%e3%81%ae%e8%a8%98%e4%ba%8b%e8%a9%b3%e7%b4%b0%e3%83%9a%e3%83%bc%e3%82%b8%e3%81%ae%e4%bd%9c%e3%82%8a%e6%96%b9%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6/#post-161982)
 * single-displayfilm.php の中で、条件分岐タグでは、タームの違いを区別できません。
   
   カテゴリー専用の関数 in_category() に相当する（似ている） has_term() か is_object_in_term()
   あたりを使うと良いのではないでしょうか。
 * 追加
    jyairo さん、gatespace さん失礼しました。in_category(), has_term() も条件
   分岐タグに含まれていますね。

15件の返信を表示中 - 16 - 30件目 (全327件中)

[←](https://ja.wordpress.org/support/users/pluto1234/replies/?output_format=md) 
[1](https://ja.wordpress.org/support/users/pluto1234/replies/?output_format=md) 
2 [3](https://ja.wordpress.org/support/users/pluto1234/replies/page/3/?output_format=md)…
[20](https://ja.wordpress.org/support/users/pluto1234/replies/page/20/?output_format=md)
[21](https://ja.wordpress.org/support/users/pluto1234/replies/page/21/?output_format=md)
[22](https://ja.wordpress.org/support/users/pluto1234/replies/page/22/?output_format=md)
[→](https://ja.wordpress.org/support/users/pluto1234/replies/page/3/?output_format=md)