Support » Plugin: Reorder Posts » Another Favorite!

  • 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.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Another Favorite!’ is closed to new replies.