Title: sheep_o5の返信 | WordPress.org 日本語

---

# sheep_o5

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

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

 返信を検索

## フォーラムへの返信

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

 *   フォーラム: [使い方全般](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%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e6%96%b0%e7%9d%80%e8%a8%98%e4%ba%8b%e3%81%ae%e3%81%bf%e3%82%92%e5%8f%96%e5%be%97/)
 *  トピック投稿者 [sheep_o5](https://ja.wordpress.org/support/users/sheep_o5/)
 * (@sheep_o5)
 * [12年、 2ヶ月前](https://ja.wordpress.org/support/topic/%e7%89%b9%e5%ae%9a%e3%81%ae%e3%82%ab%e3%83%86%e3%82%b4%e3%83%aa%e3%83%bc%e3%81%ae%e6%96%b0%e7%9d%80%e8%a8%98%e4%ba%8b%e3%81%ae%e3%81%bf%e3%82%92%e5%8f%96%e5%be%97/#post-188679)
 * 自己解決いたしました。
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [固定ページ内での条件分岐](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/)
 *  トピック投稿者 [sheep_o5](https://ja.wordpress.org/support/users/sheep_o5/)
 * (@sheep_o5)
 * [12年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/#post-178902)
 * ループを消して、試してみたのですが見出し画像が表示されませんでした。
 * 他に原因があるということでしょうか。
    content-page.php内の下記ソースに<?php wp_reset_query();?
   >を記述しないと page-スラッグ.phpの投稿内容が吐き出してくれない状態です。。
 *     ```
       <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
       	<header class="entry-header">
       		<h1 class="entry-title">
   
       <?php if(is_page('contact')): ?>
       <img src="<?php bloginfo('template_url'); ?>/images/contact.jpg" width="780px" height="50px" alt="top" />
       <?php elseif(is_page('recruit')): ?>
       <img src="<?php bloginfo('template_url'); ?>/images/recruit.jpg" width="780px" height="50px" alt="top" />
       <?php elseif(is_page('system')): ?>
       <img src="<?php bloginfo('template_url'); ?>/images/system.jpg" width="780px" height="50px" alt="top" />
       <?php endif; ?>
   
       </h1>
       	</header><!-- .entry-header -->
       <?php wp_reset_query(); ?>
       	<div class="entry-content">
       ```
   
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [固定ページ内での条件分岐](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/)
 *  トピック投稿者 [sheep_o5](https://ja.wordpress.org/support/users/sheep_o5/)
 * (@sheep_o5)
 * [12年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/#post-178899)
 * ありがとうございます。
 * ループ内で使用してないので問題ないはずなのですが、page.phpから
    content-page.
   phpを呼び出すときに、ルーフで呼び出している影響でしょうか。
 *     ```
       <?php while ( have_posts() ) : the_post(); ?>
   
       				<?php get_template_part( 'content', 'page' ); ?>
   
       				<?php
       					// If comments are open or we have at least one comment, load up the comment template
       					if ( comments_open() || '0' != get_comments_number() ) :
       						comments_template();
       					endif;
       				?>
   
       			<?php endwhile; // end of the loop. ?>
       ```
   
 *   フォーラム: [使い方全般](https://ja.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   返信が含まれるトピック: [固定ページ内での条件分岐](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/)
 *  トピック投稿者 [sheep_o5](https://ja.wordpress.org/support/users/sheep_o5/)
 * (@sheep_o5)
 * [12年、 4ヶ月前](https://ja.wordpress.org/support/topic/%e5%9b%ba%e5%ae%9a%e3%83%9a%e3%83%bc%e3%82%b8%e5%86%85%e3%81%a7%e3%81%ae%e6%9d%a1%e4%bb%b6%e5%88%86%e5%b2%90/#post-178873)
 * content-page.php内で、条件分岐でpage-スラッグ.php別に、見出し画像を変更したい
   のですが、反映されません。
 * ご教授お願い出来ますでしょうか。
 *     ```
       <h1 class="entry-title">
       <?php if(is_page('recruit')): ?>
   
       <img src="<?php bloginfo('template_url'); ?>/images/recruit.jpg" width="780" height="50" alt="" />
   
       <?php elseif(is_page('hotel')): ?>
   
       <img src="<?php bloginfo('template_url'); ?>/images/hotel.jpg" width="780" height="50" alt="" />
   
       <?php elseif(is_page('system')): ?>
   
       <img src="<?php bloginfo('template_url'); ?>/images/system.jpg" width="780" height="50" alt="" />
   
       <?php endif; ?>
       </h1>
       ```
   

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