0815

Du musst dich anmelden um Beiträge und Themen zu erstellen. Einloggen · Registrieren

Display List of Scheduled Posts

Got scheduled posts? Cool. Here’s how to display them to your readers:

<ul>
<?php $my_query = new WP_Query('post_status=future&order=DESC&showposts=5');
if ($my_query->have_posts()) {
	while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>

        <li><?php the_title(); ?></li>

	<?php endwhile; } ?>
</ul>

Place that code in the desired location of your WordPress template and display a list of scheduled posts to your readers. To change the total number of displayed posts, edit the showposts=5 parameter to any number you wish. You may also use other parameters available to the WP_Query() function to further customize the output.




0