WordPress.org

Plugin Reviews

Reorder Posts

A simple and easy way to reorder your custom post types in WordPress.

8 reviews
Average Rating
3.3 out of 5 stars
(almost) perfect
By , for WP 4.2.2

This plugin is very good. Why ? Because it does exactly what it advertises and nothing more. Also, I like that the options page is actually in the settings submenu (quite rare nowadays).

I often write my own plugins based on public plugins functions just to make them more tidy and less intrusive. Didn't have to do anything with this one !

Then, why ALMOST perfect ? Because there's an option that I'd love to see (and, I think, should be here too) is to be able (should be an option) to display posts (in the admin posts list) in the order they were chosen using the plugin.
If this features makes it in future update, be sure I'll update this review to a 5 stars !

Here's how I've done it (sorting custom post type "videos" here) :

function add_new_column($columns) {
    $columns['ordre'] = _x('Ordre', 'column name');
    return $columns;
}
function custom_column( $column, $post_id = null ) {
    switch ( $column ) {
		case 'ordre' :
		    $terms = get_post_field( 'menu_order' , $post_id );
	        if ( is_string( $terms ) )
			    echo $terms;
			else
			    print_r($terms);
			break;
    }
}
function custom_sortable_column( $columns ) {
    $columns['ordre'] = 'ordre';
    return $columns;
}
function custom_column_width() {
    echo '<style type="text/css">';
    echo '.column-ordre { width: 10% !important; }';
    echo '</style>';
}
function set_post_order( $wp_query ) {
	$wp_query->set( 'orderby', 'menu_order' );
	$wp_query->set( 'order', 'ASC' );
}
function orderByReorder($postTypeSlug) {
	global $pagenow;

	add_filter( "manage_edit-{$postTypeSlug}_columns", 'add_new_column' );
	add_filter( "manage_edit-{$postTypeSlug}_sortable_columns", 'custom_sortable_column' );
	add_action( "manage_{$postTypeSlug}_posts_custom_column" , 'custom_column' );
	add_action( "admin_head", 'custom_column_width' );
	if ( is_admin() && 'edit.php' == $pagenow && $_GET['post_type'] == $postTypeSlug && !isset($_GET['orderby']))
		add_filter( "pre_get_posts", 'set_post_order' );
}

orderByReorder("videos");

Thank you

Installed, activated, tried it, didn't work, uninstalled... in that order.
By ,

Didn't work... looked promising but my FAQs remained our of order.

Works Well.
By , for WP 4.1

Great plugin. Works well.

Just Didn't Work
By , for WP 4.1

Looked good in the backend. Nothing changed on the front end.

Another Favorite!
By , for WP 3.6.1

I like these small, well designed plugins that do exactly what they say and no more. It does not change the default sort order of posts. All it does is provide a super easy way to edit the value of the menu_order field for all post types by simply dragging the post title where you want it to show up in the list.

As stated, this needs to be paired up with some code that uses the menu_order when displaying the posts. Here is my example for getting all the "mycpt" custom post types with of a "mytax" value of "myterm" in the order left by the drag and drop admin interface.

$args = array(
  'post_type'	 => 'mycpt',
  'post_status'	 => 'publish',
  'mytax'        => $myterm,
  'orderby'	 => 'menu_order',
  'order'	 => 'asc',
);
$posts = get_posts($args);
foreach($posts as $p){...}

Why not 5 stars? Well, it times out or something when I tried to display all 14,000 posts, so I'm just using this for a custom post type with only a hundred or so posts.

Didn't work for me
By , for WP 3.8

Installed... activated... re-ordered posts in Posts -> Order but had no effect.

Works Like It Says
By , for WP 3.7.1

This plugin works exactly as it says it does. A great quick plugin to add in when someone asks to be able to re-order the posts. Just remember to use:

'orderby' => 'menu_order',
'order' => 'ASC'
Works a charm back-end, front-end not so much.
By , for WP 3.6.1

Didn't work. Dunno why. Backend UI was just what I was looking for, but it simply didn't perform as stated. :(

You must log in to submit a review. You can also log in or register using the form near the top of this page.