AMAZING PLUGIN I cant get to work - Post Mash


Author Message
Toby

Posted: 6/10/2009
Quote message 

Found this plugin - Post Mash Filetered

http://wordpress.org/extend/plugins/postmash-filtered/

If you are hacking Wordpress to use it as a CMS this really helps as you can reorder all posts on the site. Or at least should be able too. The instructions to install are below but when I place the code in front of the have posts function it seems to make no difference for me and I thought it might be an issue with the Artisteer template. Any suggestions. The instructions for the code amend are below.

To make use of this chosen order you will need to modify your template code:

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.