Custom Fields
Re-Envisioned
Support MB Custom Post Type Unable to edit taxonomies in Editor

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #23929
    Long Nguyen
    Moderator

    Hi,

    You can use the function post_categories_meta_box() as the callback function of the setting meta_box_cb.

    The code should be:

    $args = [
            'label'              => esc_html__( 'Positions', 'irw-position-textdomain' ),
            'labels'             => $labels,
            'description'        => '',
            'public'             => true,
            'publicly_queryable' => true,
            'hierarchical'       => false,
            'show_ui'            => true,
            'show_in_menu'       => true,
            'show_in_nav_menus'  => true,
            'meta_box_cb'        => 'post_categories_meta_box', //here
            'show_in_rest'       => true,
            'show_tagcloud'      => true,
            'show_in_quick_edit' => true,
            'show_admin_column'  => false,
            'query_var'          => true,
            'sort'               => false,
            'rest_base'          => '',
            'rewrite'            => [
                'with_front'   => false,
                'hierarchical' => false,
            ],
        ];

    Get more details in the documentation https://developer.wordpress.org/reference/functions/register_taxonomy/.

    And refer to this topic https://wordpress.org/support/topic/custom-taxonomies-throwing-error/.

    #23932
    riderworks
    Participant

    .Thanks Long, That worked

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.