固定ページ(トップページ)の記事に<!–more–>を付けたい
-
現在、固定ページ(toppage.php)をトップページにして、index.php(ブログ)の最新情報の記事をひとつだけ表示させています。
その最新記事の中に使われている<!–more–>を、固定ページでも機能させたいのですが。何か方法はございますでしょうか。<!-- 最新記事を1件だけ表示 --> <?php $posts = get_posts('numberposts=1'); foreach($posts as $post) : setup_postdata($post); ?> <div class="content" id="post-<?php the_ID(); ?>"> <div class="post"><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <div class="page"> <?php the_content(); ?> <div class="postmetadata"> new update: <?php the_date(); ?> | <?php the_category(', ') ?> </div> </div> </div> <?php endforeach; ?><!-- /最新記事を表示 -->
2件の返信を表示中 - 1 - 2件目 (全2件中)
2件の返信を表示中 - 1 - 2件目 (全2件中)
- トピック「固定ページ(トップページ)の記事に<!–more–>を付けたい」には新たに返信することはできません。