postMash

postMash is another WordPress plugin I’ve written very similar to a previous plugin of mine; (pageMash). However it is a fair bit simpler since posts have no parenting structure, the ordering is only linear.

Posts are usually listed in reverse chronological order as they are often used for posting regular time-orientated content, however if you want to choose the order they appear in, then this is the plugin for you.

Usage

To make use of this chosen order you will need to use different code such as the following:

<?php
function wp_cat_posts() {
	$posts = get_posts(array('order' => ASC, 'orderby' => menu_order));
	echo '<ul>';
	foreach($posts as $post ) {
		echo '<li><a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></li>';
	}
	echo '</ul>';
}
?>

Download

The plugin is available for download from wordpress.org, so get heading..

NB. Please note this plugin is in it’s infancy so has not yet undergone the thorough testing of the WP community and therefore may contain bugs. If you do happen to come across a bug please report it me.

Recent posts on postMash


2 Responses to “postMash”

  1. No replies Ray:
    @Reply December 27th, 2008 at 6:43 pm

    Where exactly do you put the code for your postmash plugin? Which file do I insert the code snippet in?

  2. No replies Joel:
    @Reply December 29th, 2008 at 9:40 pm

    @Ray:
    It depends on the intended use, and how your template is structured.
    You most likely want to put it in your index.php or sidebar.php files in your template, but you do need to know what you’re doing.
    The above code is a function and therefore requires a call to actually execute it, such as:
    <?php wp_cat_posts() ?>
    It also only outputs a simple link so you may need to develop the code further to fit your requirements.



Leave a Reply

XHTML» permissible tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>