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

ワードプレステーマ別

トップページのお知らせ一覧を削除する方法

Q.トップページのお知らせ一覧を削除したい

A.下記のphpファイルの該当箇所を削除してください

編集するファイル:メインインデックスのテンプレート (index.php)
編集する箇所:

   <?php
       $index_news_num = $options['index_news_num'];
       $args = array('post_type' => 'news', 'ignore_sticky_posts' => 1, 'posts_per_page' => $index_news_num);
       $index_news_list = get_posts($args);
       if ($index_news_list) {
  ?>
  <div class="left">
   <h3 class="headline"><?php echo $options['index_news_headline']; ?></h3>
   <ol>
    <?php
         foreach ($index_news_list as $post) : setup_postdata ($post);
    ?>
    <li class="clearfix">
     <a class="image" href="<?php the_permalink() ?>"><?php the_post_thumbnail('size1'); ?></a>
     <?php if ($options['show_date']){ ?><p class="date"><time class="entry-date updated" datetime="<?php the_modified_time('c'); ?>"><?php the_time('Y.n.j'); ?></time></p><?php }; ?>
     <a class="title" href="<?php the_permalink() ?>"><?php the_title(); ?></a>
    </li>
    <?php endforeach; wp_reset_query(); ?>
   </ol>
   <?php if($options['show_index_news_button'] == 1) { ?><a class="link_button" href="<?php echo get_post_type_archive_link('news'); ?>"><?php echo $options['index_news_button']; ?></a><?php }; ?>
  </div>
  <?php }; ?>

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

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

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