A plugin which allows you to sort posts, pages, custom post type in ANY order and display the same in your sidebar.
While WordPress allows you to make your posts sticky, or even sort them in ascending or descending order, sometimes this is just not enough. What if you want to display the posts in ANY order you need? Unfortunately there is no such functionality in WordPress, which is where this plugin saves the day.
This plugin works on sections of posts, which you can define based on the following three criteria:
You can display ordered posts in theme with query_posts or get_posts or WP_Query like this :
query_posts(‘section_name=NAME_OF_SECTION’);
Here NAME_OF_SECTION must be replaced with your actual section name. If no section found with mentioned name then nothing will change.
OR
Once the sections are created, you can display these posts using widgets.
custom-templates
folder of your plugin (/wp-content/plugins/my-posts-order/includes/custom-templates/loop.php
) and (/wp-content/plugins/my-posts-order/includes/custom-templates/loop_rss.php
).Now wasn’t that easy!
my-posts-order
folder to the /wp-content/plugins/
directoryMy Posts Order Options
.My Posts Order
Widget in the Widget Area.You need to create loop.php file in your custom-templates folder. For eg.
<a href="” title=””>
For for rss option create another file loop_rss.php
I’m giving three examples from Twenty Twelve, Twenty Eleven and Twenty Ten
In Twenty Twelve(verison 1.1) you need to edit your index.php file like this
get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php query_posts('section_name=lipsum'); ?> <?php if ( have_posts() ) : ?>
In Twenty Eleven(verison 1.5) you need to edit your index.php file like this
get_header(); ?>
<div id="primary"> <div id="content" role="main"> <?php query_posts('section_name=lipsum'); ?> <?php if ( have_posts() ) : ?>
In Twenty Ten(verison 1.5) you need to edit your loop.php file like this
Here lipsum is the section name that I created in the backend.
Please send me your suggestions/feedback/queries to [email protected] and help me to improve this Plugin.