Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Justin Sternberg
@NicHagane that sounds like a switch_to_blog error. Where some plugin/theme used that function but didn’t restore the previous blog
@emilianonatella that sounds like an issue with the theme. Did you contact the theme author?
Pawel Dabrowa
Hi I would like to create admin menu with CMB2 but the snippet on the github it isn’t good
Anyone can send me any link to some resources, thanks.
Good day , I checking Query monitor and found some errors for CMB2 plugin . Please assist
Hi Everyone
I need a bit of help regarding cmb2 fields
I'm new in it so i am fetching my custom post type as multiselect field in my page , but i want my admin to sort these custom post types as well.
I have searched on google as there is no field which will help me also multiselect and sort them also
Oscar Castañeda
hi everyone, i need help with the info that CMB2 show in the rest api, when the CMB is a field type "file" it only show: "image_id", "image". Can i get in the rest api fields as image's sizes "thumbnail, medium,... ect"?
Justin Sternberg
@ojcastaneda_gitlab You will need to make a second request to the media endpoint: wp-json/wp/v2/media/<image_id>
Oscar Castañeda
@Jtsternberg_twitter thanks
Shahadat Hossain
is it possible to create admin theme option with CMB2? Please help
hello i active plugin repo but not display in pages..
Hi there, I am trying to create a taxonomy term field group for CPT "recipe" and taxonomy "category", but I can't seem to figure it out. I noticed I have to set 'object_types', but can I set it to have 2 conditions, CPT and taxonomy? Thanks!

function example_cb() {
$cmb_rest = new_cmb2_box( array(
'id' => 'yourprefix_demo_metabox',
'title' => esc_html__( 'Test Metabox', 'cmb2' ),
'object_types' => array( 'post', 'term' ), // Post type
'taxonomies' => array( 'category' ),
) );

$cmb_rest->add_field( array(
    'name'       => esc_html__( 'Test', 'pluginname' ),
    'id'         => 'test',
    'type'       => 'text',
) );

add_action( 'cmb2_admin_init', 'example_cb' );

Thank you, but that adds the field to all the CPT's that have the taxonomy "category". I only want to add the fields to the "recipe" taxonomy.
Justin Sternberg
above, you said you have a CPT "recipe", but now you're saying "recipe" taxonomy. Can you explain more clearly?
to only show on term-edit for "recipe" taxonomy:
function example_cb() {
    $cmb = new_cmb2_box( array(
        'id'           => 'yourprefix_demo_metabox',
        'title'        => esc_html__( 'Test Metabox', 'cmb2' ),
        'object_types' => array( 'term' ), // Post type
        'taxonomies'   => array( 'recipe' ),
    ) );
    $cmb->add_field( array(
        'name'       => esc_html__( 'Test', 'pluginname' ),
        'id'         => 'test',
        'type'       => 'text',
    ) );
add_action( 'cmb2_admin_init', 'example_cb' );
Eslam Foula
Hello, how to retrieve the attachment sizes/id in response, while using "file_list" - WP Rest API? Thank you!
Sagor Khan
Hi, How can I show shortocode on cmb2 Like contact form 7 shortcoe? Can you please help?
9 replies
Juan Pablo
Hi Guy, Is there a way to limit images in file_list field in admin?
Khaled Fathy
Hi Guys, is nested groups possible with CMB2?
Carlos Herrera
thanks for join this chat
i have a question. is possible change the money format response?.
i need display european money format
Justin Sternberg
@cehojac yes, there's an example for doing that in the wiki: https://github.com/CMB2/CMB2/wiki/Field-Types#text_money
Carlos Herrera
TY @Jtsternberg_twitter !!!
Justin Sternberg
Arya Sutrisna Putra
hi anyone is here ?
I need help to get each group list id , is that possible ?
I need help to incorporate conditional in wordpress
James Auble
When i create parent box for the options-page i get that title as the parent menu item and also as a child
there a way to surpress this coming up twice?
I have a question...
how can I add or use Shamsi calendar during working with cmb2?
My theme developer using this code to call CMB2 meta fields
echo cmb2_get_metabox_form( $metaboxes_form, $post_id, array(
'form_format' => '<form action="' . esc_url(WP_Job_Board_Mixes::get_full_current_url()) . '" class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="object_id" value="%2$s">%3$s<input type="submit" name="submit-cmb-profile" value="%4$s" class="button-primary"></form>',
'save_button' => esc_html__( 'Save Profile', 'workup' ),
) );
I am unable to understand, where I can find it, to edit these fields?
Can you please help?
Thank you./
Christophe Rudyj
Hi it's not much of question more than would I need help to make it more DRY https://gist.github.com/kuipou/6ddd8f713a760367c49337387d7a74e4
if someone would like to take stab at it would be awesome
hi hoow can i display pdf files for metabox in frontend