Skip to content

Instantly share code, notes, and snippets.

@mwordpress
Created February 12, 2017 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwordpress/17cd7be61b8851d4fd6f8d5496b612cb to your computer and use it in GitHub Desktop.
Save mwordpress/17cd7be61b8851d4fd6f8d5496b612cb to your computer and use it in GitHub Desktop.
this codes listed here is part of the following article : https://www.mwordpress.net/display-scheduled-posts-in-sidebar/
<?php
$param = array(
'post_status' => 'future',
'order' => 'ASC',
'post_per_page' => '5'
);
$scheduled_posts = new WP_Query($param);
if ($scheduled_posts->have_posts()) :
while ($scheduled_posts->have_posts()) : $scheduled_posts->the_post();
?><li><?php the_title(); ?> – <span><?php the_time('j F, Y') ?></span></li><?php
endwhile;
else:
echo '<li>لا يوجد مواضيع مجدولة حاليا</li>';
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment