WordPress.org

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] Does 'Show Admin Column' do what I think it's supposed to? (4 posts)

  1. Ben Hutchings
    Member
    Posted 2 years ago #

    I have two CPT-onomies, both linked to each other (Accommodation & Room Type). I need them linked so that I can use their values to populate Advanced Custom Fields selectors in each types admin area, but I want to disable the default UI that is injected in the sidebar. It seems to be that the 'Show Admin Column' sounds like it does this. However, when I set it to false, the metabox still shows up. Any ideas?

    Thanks!

    http://wordpress.org/plugins/cpt-onomies/

  2. Rachel Carden
    Member
    Plugin Author

    Posted 2 years ago #

    The "Show Admin Column" is for the main Edit Screen, "wp-admin/edit.php", the one with the table that shows all the posts.

    If you want to hide the meta box, I have a filter for that. Just return false.

    add_filter( 'custom_post_type_onomies_add_cpt_onomy_admin_meta_box', 'my_website_add_cpt_onomy_admin_meta_box', 1, 3 );
    function my_website_add_cpt_onomy_admin_meta_box( $add_meta_box, $taxonomy, $post_type ) {
       return $add_meta_box;
    }
  3. Ben Hutchings
    Member
    Posted 2 years ago #

    Brilliant brilliant brilliant that's exactly what I needed, and I only wanted to turn off one meta-box, not all of them, so did this:

    add_filter( 'custom_post_type_onomies_add_cpt_onomy_admin_meta_box', 'uc_cpt_onomy_admin_meta_box', 1, 3 );
    function uc_cpt_onomy_admin_meta_box($add_meta_box, $taxonomy, $post_type) {
    	if ($taxonomy == 'roomtype') {return false;}
    	else {return $add_meta_box;}
    }

    Thanks!

  4. Rachel Carden
    Member
    Plugin Author

    Posted 2 years ago #

    Glad I could help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags