Created
February 12, 2017 05:21
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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