Use date in the URL of custom post type

Custom post types can not use the “day/name” permalink structure defined in WordPress permalinks settings. You need to add your own rewrite rules to fit your needs. For example: add_action(‘init’,’my_rewrite_rules’); function my_rewrite_rules(){ // Replace custom_post_type_slug with the slug of your custom post type add_rewrite_rule( ‘custom_post_type_slug/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(.+)/?$’, ‘index.php?custom_post_type_slug=’.$matches[4], ‘top’ ); } Note that I’ve not tested the … Read more

Grouping of CPTs and taxonomies into menu groups in admin

We could manipulate the global $menu and $submenu inside the admin_menu hook. But it’s easier to let Mike Schinkel’s WP Admin Menu Classes take care of it. require_once(‘inc/wp-admin-menu-classes.php’); add_action( ‘admin_menu’, function() { $plugin_page=”wpse_114343″; add_menu_page( ‘Console’, ‘Console’, ‘edit_pages’, $plugin_page, function() {}, “http://cdn.sstatic.net/stackexchange/img/favicon.ico”, 6 ); // Move the CPT Movie and remove original $cpt = “edit.php?post_type=movie”; copy_admin_menu_item( … Read more