WP Rewrite Rule Issue while using Custom post type & taxonomy

Don’t really know why but here is a working solution : $blogCategoryBaseSlug = ‘articles’; $labels = array( ‘name’ => __( ‘Blog Post’, ‘Post Type General Name’, $this->text_domain ), ‘singular_name’ => __( ‘Blog Post’, ‘Post Type Singular Name’, $this->text_domain ), ‘menu_name’ => __( ‘Blog Posts’, $this->text_domain ), ‘name_admin_bar’ => __( ‘Blog Post’, $this->text_domain ), ‘archives’ => … Read more

Admin Filter – Add Post Type Description on Post Type Page

The filter views_{$this->screen->id} is fired just after the title of post edit screen has been print to screen, so it’s a safe place to just echo what you want. So you can simply do: function post_type_desc( $views ){ $screen = get_current_screen(); $post_type = get_post_type_object($screen->post_type); if ($post_type->description) { printf(‘<h4>%s</h4>’, esc_html($post_type->description)); // echo } return $views; // … Read more

Set a CPT slug as a base name for all the taxonomies

I think if you change the rewrite in your register_taxonomy $args ‘rewrite’ => array( ‘slug’ => ‘photographies/couleurs’,’with_front’ => false ), This will probably clash with rewriting the custom post type so you’ll more than likely get a 404 on this url: http://thewebsite/photographies/ but if you don’t need that url then this solution will help you … Read more

Add Custom Post type menu to another menu in specific location

Fixed and here’s how, please excuse the unedited cut and paste, thanks to @mmm for the pointers on how: Add Custom Post Type via Action add_action(‘init’, array($this, ‘mactrak_custom_post_type_add’)); Above function as called (mactrak_custom_post_type_add) includes argument to set up meta box and menu position Following construct: add_action(‘admin_menu’, array(&$this,’mactrak_admin_menu’)); runs following script: add_menu_page( ‘MacTrak – the WP … Read more