[Plugin: postMash (filtered) – custom post order] I've just modified this plugin to be category
I am using More Types to create my custom post types. This plugin allows me to set an automatic category for each post type and then hide the category box on the write page so that made this a little easier.
on line 66 in postMASH.php, I added this:
$categoryid = "188";
replace 188 with your own category id.
I then search and replaced $_GET[‘cat’] with $categoryid to trick the filter into always filtering by my category. This leaves for a lot of extra code hanging around but I’ll deal.
Then, I wanted to move the postMASH submenu into the custom post type/category that it will be modifying to make it most clear for the client. on what will be line 246 (was 245) I modified the code to be
add_submenu_page('edit.php?post_type=resource', 'Library: Order Posts', 'Order', $minlevel, __FILE__, 'postMash_main');
replace ‘resource’ with the name of your post type.
Also, I have not had to tackle how I would use this for more than one category/post_type but I would probably resort to making a cloned plugin with the necessary edits.
Hopefully when this plugin is updated for 3.0.1 these will be built in but it functions correctly for me on this version of WP.
- The topic ‘[Plugin: postMash (filtered) – custom post order] I've just modified this plugin to be category’ is closed to new replies.