Support Forum
Hi! Seems like there is a bug on Taxonomy field: It updates the terms when saving the post. But if I reload the post, the terms disappear from the Taxonomy field (stil remain on the default taxonomy).
Please check this video:
https://nimb.ws/lOH18u
Thanks
Hi,
If you want to use the field taxonomy
on the editing page, please remove the standard taxonomy box of WordPress. Please edit the taxonomy then uncheck the option "Show on edit page" in the Advanced tab. Screenshot https://monosnap.com/file/jal9hQkBzSbjJ4Kc1Z4a66n9KzxWug
Hi. Thank you for your reply.
I unchecked the option "Show on edit page" but still get the same issue. The selected terms keep disappearing from the Taxonomy field after reloading the page.
Hi,
Can you please share the code that creates the custom fields on your site?
Hi! It was created by Meta Box AIO:
I can give you a temporary admin account to check if needed.
add_action( 'init', 'your_prefix_register_taxonomy' );
function your_prefix_register_taxonomy() {
$labels = [
'name' => esc_html__( 'Yoga Categories', 'your-textdomain' ),
'singular_name' => esc_html__( 'Yoga Category', 'your-textdomain' ),
'menu_name' => esc_html__( 'Yoga Categories', 'your-textdomain' ),
'search_items' => esc_html__( 'Search Yoga Categories', 'your-textdomain' ),
'popular_items' => esc_html__( 'Popular Yoga Categories', 'your-textdomain' ),
'all_items' => esc_html__( 'All Yoga Categories', 'your-textdomain' ),
'parent_item' => esc_html__( 'Parent Yoga Category', 'your-textdomain' ),
'parent_item_colon' => esc_html__( 'Parent Yoga Category:', 'your-textdomain' ),
'edit_item' => esc_html__( 'Edit Yoga Category', 'your-textdomain' ),
'view_item' => esc_html__( 'View Yoga Category', 'your-textdomain' ),
'update_item' => esc_html__( 'Update Yoga Category', 'your-textdomain' ),
'add_new_item' => esc_html__( 'Add New Yoga Category', 'your-textdomain' ),
'new_item_name' => esc_html__( 'New Yoga Category Name', 'your-textdomain' ),
'separate_items_with_commas' => esc_html__( 'Separate yoga categories with commas', 'your-textdomain' ),
'add_or_remove_items' => esc_html__( 'Add or remove yoga categories', 'your-textdomain' ),
'choose_from_most_used' => esc_html__( 'Choose most used yoga categories', 'your-textdomain' ),
'not_found' => esc_html__( 'No yoga categories found.', 'your-textdomain' ),
'no_terms' => esc_html__( 'No yoga categories', 'your-textdomain' ),
'filter_by_item' => esc_html__( 'Filter by yoga category', 'your-textdomain' ),
'items_list_navigation' => esc_html__( 'Yoga Categories list pagination', 'your-textdomain' ),
'items_list' => esc_html__( 'Yoga Categories list', 'your-textdomain' ),
'most_used' => esc_html__( 'Most Used', 'your-textdomain' ),
'back_to_items' => esc_html__( '← Go to Yoga Categories', 'your-textdomain' ),
'text_domain' => esc_html__( 'your-textdomain', 'your-textdomain' ),
];
$args = [
'label' => esc_html__( 'Yoga Categories', 'your-textdomain' ),
'labels' => $labels,
'description' => '',
'public' => true,
'publicly_queryable' => true,
'hierarchical' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'show_tagcloud' => true,
'show_in_quick_edit' => true,
'show_admin_column' => false,
'query_var' => true,
'sort' => false,
'meta_box_cb' => 'post_tags_meta_box',
'rest_base' => '',
'rewrite' => [
'with_front' => false,
'hierarchical' => false,
],
];
register_taxonomy( 'yoga-category', ['yoga-pose'], $args );
}
Hi,
Thanks for your additional information.
I mean the code that creates the custom fields, not the taxnonomy. Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Hi. Sorry for the wrong code.
Here is the custom fields code:
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
function your_prefix_function_name( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = [
'title' => __( 'Yoga Pose Fields', 'your-text-domain' ),
'id' => 10,
'post_types' => ['yoga-pose'],
'fields' => [
[
'name' => __( 'Yoga Category', 'your-text-domain' ),
'id' => $prefix . 'yoga_category',
'type' => 'taxonomy',
'taxonomy' => ['yoga-category'],
'field_type' => 'select_advanced',
],
],
];
return $meta_boxes;
}
Hi,
Thanks for your additional information.
I do not see any issue with those blocks of code. Can you please try to deactivate all plugins except Meta Box, MB AIO and switch to the standard theme of WordPress (Twenty TwentyTwo) and recheck this issue?