- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
CherryFramework 3.x. How to show scheduled posts
May 2, 2016
Hello! This tutorial will show you how to show scheduled posts in WordPress CherryFramework 3.x. templates.
CherryFramework 3.x. How to show scheduled postsIn order to do such changes, please follow the steps below:
Open the file you would like your changes to be applied to (we will use sidebar.php). This should be done on your server, that is why please make sure that your php file is copied to the child theme -> themeXXXX directory.
Open the file and add the following code to the end of it:
<?php query_posts('posts_per_page=10&post_status=future'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h2><?php the_title(); ?></h2> <span class="datetime"><?php the_time('j. F Y'); ?></span></p> <?php endwhile;else: ?> <p>No future events scheduled.</p> <?php endif; ?>
After you’ve saved the file, make sure that you have posts, which are scheduled. In order to do so, follow the steps below:
Enter Posts tab, which is located in admin panel. Open any post you need and find publish tab, which is located on the left:
There you should change the date to future and save changes.
That is all to be done.
Feel free to check the detailed video tutorial below:
CherryFramework 3.x. How to show scheduled posts