Title: Custom post type support?
Last modified: August 30, 2016

---

# Custom post type support?

 *  [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-support-23/)
 * Is it possible to set radios for taxonomies for specific post types? i.e. the
   same taxonomy would appear as radios for one custom post type, but checkboxes
   for another.
 * [https://wordpress.org/plugins/radio-buttons-for-taxonomies/](https://wordpress.org/plugins/radio-buttons-for-taxonomies/)

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

 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-support-23/#post-6300428)
 * That behavior isn’t supported by RB4T. However, I am sure you could work something
   out.
 * Take a look at how I am [removing the metabox](https://github.com/helgatheviking/Radio-Buttons-for-Taxonomies/blob/master/inc/class.WordPress_Radio_Taxonomy.php#L78)
   and how I am [adding the metabox](https://github.com/helgatheviking/Radio-Buttons-for-Taxonomies/blob/master/inc/class.WordPress_Radio_Taxonomy.php#L92).
   In your case, for certain post types, you’d want to remove the RB4T term metabox
   and restore the default WordPress version.
 *  Thread Starter [iltdevunit](https://wordpress.org/support/users/iltdevunit/)
 * (@iltdevunit)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-support-23/#post-6300565)
 * I replaced remove_meta_box() with this:
 *     ```
       public function remove_meta_box()
       {
          if (!is_wp_error($this->tax_obj) && isset($this->tax_obj->object_type)) {
   
             $post_types = array('custom_post_type_a','custom_post_type_b');
             foreach($post_types as $post_type){
                remove_meta_box( $this->taxonomy.'div', $post_type, 'side' );
             }
          }
       }
       ```
   
 * Of course all this will get blown away if the plugin is updated, so it’s not 
   really a long term solution.
 *  Plugin Author [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * (@helgatheviking)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-support-23/#post-6300573)
 * Yeah, that isn’t a good long-term solution. I was thinking you could do something
   on the `add_meta_boxes` hook. Totally untested, and only as a suggestion:
 *     ```
       add_action( 'add_meta_boxes', 'customize_rb4t_metaboxes', 20 );
       function customize_rb4t_metaboxes(){
       	global $post;
   
       	if( in_array( $post->post_type ), array('custom_post_type_a','custom_post_type_b' ) ){
                       // hierarchical style tax
       		remove_meta_box( 'radio-yourtaxdiv', $post->post_type, 'side' );
       		add_meta_box( 'yourtaxdiv', 'Metabox Label', 'post_categories_meta_box', $post->post_type, null, 'side', 'core' );
   
                       // non-hierarchical (tags) style tax
       		//remove_meta_box( 'radio-tagsdiv-yourtax', $post->post_type, 'side' );
       		//add_meta_box( 'tagsdiv-yourtax', 'Metabox Label', 'post_tags_meta_box', $post->post_type, null, 'side', 'core' );
   
       	}
   
       }
       ```
   

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

The topic ‘Custom post type support?’ is closed to new replies.

 * ![](https://ps.w.org/radio-buttons-for-taxonomies/assets/icon-256x256.png?rev
   =2864757)
 * [Radio Buttons for Taxonomies](https://wordpress.org/plugins/radio-buttons-for-taxonomies/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/radio-buttons-for-taxonomies/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/radio-buttons-for-taxonomies/)
 * [Active Topics](https://wordpress.org/support/plugin/radio-buttons-for-taxonomies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/radio-buttons-for-taxonomies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/radio-buttons-for-taxonomies/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [HelgaTheViking](https://wordpress.org/support/users/helgatheviking/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/custom-post-type-support-23/#post-6300573)
 * Status: not resolved