ページに3つの最新ページを表示するこのコードがあります。
これで、3 つの個別のページのコンテンツを表示するページができました。これらの 3 ページのそれぞれに、すべてのコンテンツを表示するのではなく、一定量の文字を表示したいと考えています。その後、個々のページにつながる「続きを読む」リンクが表示されます。
誰かが正しい方向に私を助けることができますか? ありがとう!
<?php
query_posts(array('showposts' => <number_of_pages_to_show>, 'post_parent' => <ID of the parent page>, 'post_type' => 'page'));
while (have_posts()) { the_post();
the_title();
the_content();
}
wp_reset_query(); // Restore global post data
?>