Title: [Plugin: postMash &#8211; custom post order] Request: Enable per post-type
Last modified: August 19, 2016

---

# [Plugin: postMash – custom post order] Request: Enable per post-type

 *  [Erlend](https://wordpress.org/support/users/sadr/)
 * (@sadr)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/)
 * A great feature addition this this plugin would be ‘enable per post-type’. So
   say if I’ve got a special ‘wiki’ post type for my wiki pages, which is the only
   type of page I care to change the default order of, I could enable postMash just
   for this type and leave the rest of my posts to the default settings.
 * [http://wordpress.org/extend/plugins/postmash/](http://wordpress.org/extend/plugins/postmash/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [psperkins](https://wordpress.org/support/users/psperkins/)
 * (@psperkins)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/#post-1611745)
 * Well I agree that would be a cool feature to add to future versions.
 * However, (and I know it’s naughty to do this – call it “black hat” even) on line
   60 of the plugin file “postMash.php” is a query where the post_type is defined
   plain as the nose on your face.
 * `$pageposts = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type 
   = 'post' ORDER BY menu_order");`
 * It could be customized there.
    Then the trick would be to get postmash into the
   menu of your custom post type and not in your regular posts menu.
 * hmmmmm…..
 *  [psperkins](https://wordpress.org/support/users/psperkins/)
 * (@psperkins)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/#post-1611746)
 * ok if you have decided to hack the plugin file, I figured out how to make it 
   add the menu to the right place, from my experience with dealing with custom 
   post types and adding custom features to them.
 * 1) like I said – change the post_type= part of LINE60 to your custom post type.
 * 2) postMash adds it’s menus at the end of the same file, in a function named “
   postMash_add_pages”. In this case I added postMash menu to my custom post type
   named “staff” :
 *     ```
       function postMash_add_pages(){
       	//add menu link
       	global $minlevel, $wp_version;
       	if($wp_version >= 2.7){
       		$page = add_submenu_page('edit.php?post_type=staff', 'postMash: Order Posts', 'Arrange', $minlevel,  __FILE__, 'postMash_main');
       	}else{
       		$page = add_management_page('postMash: Order Posts', 'postMash', $minlevel, __FILE__, 'postMash_main');
       	}
       	add_action("admin_print_scripts-$page", 'postMash_head'); //add css styles and JS code to head
       }
       ```
   
 *  [bigmikestudios](https://wordpress.org/support/users/bigmikestudios/)
 * (@bigmikestudios)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/#post-1611768)
 * I’ve modified this a bit further, this hack creates a “Reorder Posts” page in
   the cp for each custom post type (in addition to regular posts). I’ve commented
   where I modified the code; search for ‘BMS’
 * _[please use a [Pastebin](http://pastebin.com/) to post large chunks of code,
   [following forum etiquette](http://codex.wordpress.org/Forum_Welcome#Posting_Code)]_
 *  [psperkins](https://wordpress.org/support/users/psperkins/)
 * (@psperkins)
 * [15 years ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/#post-1611772)
 * I’d like to see what you came up with Big Mike Studios. Looks like it got chopped
   here.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: postMash – custom post order] Request: Enable per post-type’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/postmash.svg)
 * [postMash - custom post order](https://wordpress.org/plugins/postmash/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/postmash/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/postmash/)
 * [Active Topics](https://wordpress.org/support/plugin/postmash/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/postmash/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/postmash/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [psperkins](https://wordpress.org/support/users/psperkins/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/plugin-postmash-custom-post-order-request-enable-per-post-type/#post-1611772)
 * Status: not a support question