Plugin Directory

postMash - custom post order

You no longer need to modify your template code in any way!!

Here is the old install info, not needed now, but maybe useful if you want to remove the old code from you template, but can't remember what you changed..

Open wp-content/themes/your-theme-name/index.php and find the beginning of ‘the loop’. Which will start: if(have_posts()). Then add the following code directly before this:

<?php  
    $wp_query->set('orderby', 'menu_order');  
    $wp_query->set('order', 'ASC');  
    $wp_query->get_posts();  
?>

This just tells WP to get the posts ordered according to their ‘menuorder’ position. Therefore you can get the posts ordered anytime you use a function such as getposts simply by giving it the required arguments:

<?php get_posts('orderby=menu_order&order=ASC'); ?>

Checkout the getposts() function in the wordpress codex for more info. Note that it says menuorder is only useful for pages, posts have a menu_order position too, it just isn’t used. postMash provides you with an iterface so that you can use it.

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(9 ratings)