採用サイト制作に最適なWordPressテーマ「ISSUE」の機能概要

ワードプレステーマ別

トップページの「最近の記事」を非表示にする方法

下記のphpファイルの該当箇所を編集します

編集するファイル:index.php
編集(削除)する箇所:

  <?php // Recent post
---------------------------------------------------------------------------------------
?>
  <div id="index_recent_post">
   <h3 class="headline1"><?php _e("Recent post","tcd-w");
?><span><?php next_posts_link(__('Archives', 'tcd-w')) ?></span></h3>
   <?php
       $odd_or_even = 'odd';
       $args = array('post_type' => 'post', 'posts_per_page' => 6);
       $index_recent_post = get_posts($args);
       if ($index_recent_post) {
   ?>
   <ul class="clearfix">
    <?php foreach ($index_recent_post as $post) : setup_postdata ($post); ?>
    <li class="clearfix <?php echo $odd_or_even; ?>">
     <a class="image" href="<?php the_permalink() ?>"><?php if (
has_post_thumbnail()) { echo the_post_thumbnail('size3'); } else {
echo '<img src="'; bloginfo('template_url'); echo
'/img/common/no_image3.jpg" alt="" title="" />'; }; ?></a>
     <div class="info">
      <?php if ($options['show_date']) { ?><p class="date"><?php
the_time('Y/n/j'); ?></p><?php }; ?>
      <h4 class="title"><a href="<?php the_permalink() ?>"><?php
trim_title(40); ?></a></h4>
     </div>
    </li>
    <?php $odd_or_even = ('odd'==$odd_or_even) ? 'even' : 'odd';
endforeach; wp_reset_query(); ?>
   </ul>
   <?php }; ?>
  </div><!-- END #index_recent_post -->

この記事は役に立ちましたか?

もし参考になりましたら、下のボタンで教えてください。
今後の記事作成の参考とさせて頂きます!

同じテーマのカスタマイズ記事