by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
ieotarohit
@ieotarohit

@anilshah694 Follow the URL:-

https://github.com/CMB2/CMB2/wiki/Basic-Usage

Susant Paudel
@susantp
how to update CMB2 while it is not uploaded as plugins . I included CMB2 library in my theme.
Justin Sternberg
@jtsternberg
@susantp just download the plugin from http://wordpress.org/plugins/cmb2/, then replace the guts of your cmb2 folder with what is in the downloaded zip
Chris Reynolds
@jazzsequence
Or do the same from GitHub. But there's no way to automatically update CMB2, it's a manual thing.
Justin Sternberg
@jtsternberg
(when it's bundled)
Also, if you do it from github, you're going to get a lot of the developer artifacts... e.g. the tests directory, the sass files, etc. Things you won't need.
amit648
@amit648
first i created user metabox for using user post type.. So many field insert this metabox..So get only one fields on register page so how to get that fields and save data that user metabox.
amit648
@amit648
Please answer of my question and any one help or suggest for me..
Justin Sternberg
@jtsternberg
Sorry, it's not clear what you are asking
amit648
@amit648
Simply , i want to get one field of metabox in register form and that field save it that metabox .
Ian Barker
@iantbarker
Anyone know how I can retrieve a specific value from my repeatable field group? Essentially, how do I get a specific value from an array?
Justin Sternberg
@jtsternberg
@iantbarker like a specific value from an specific row, or a specific field from all rows?
Ian Barker
@iantbarker
@jtsternberg Good question... Specific value (first is fine) from the specific row (first is fine)
Justin Sternberg
@jtsternberg
@iantbarker have you seen the docs for it? https://github.com/CMB2/CMB2/wiki/Field-Types#css-field-class-32
Ian Barker
@iantbarker
@jtsternberg I looked through those but didn't see anything but am probably missing something. I know how to loop through and get all the values.
Justin Sternberg
@jtsternberg
@iantbarker using that example in the wiki, something like this:
Ian Barker
@iantbarker
Ohhh... I see it now. That link went to WYSIWYG section for some reason so didn't understand the connection. Now I see. Thanks so much!
Ashiqur Rahman
@ashiq35
How display all the users in a dropdown option
Justin Sternberg
@jtsternberg
You would likely use an example similar to this one, but updating to use the user query methods: https://github.com/CMB2/CMB2/wiki/Adding-your-own-field-types#example-2-posts-or-other-post_type-dropdown-store-post_id
Rich Deane
@QTRichieRich
Hi - has anyone tried to export CMB2 settings to json to then import? I get a type error on the import side, looks like some data is lost through the unserialise > json > serialise...
Justin Sternberg
@jtsternberg
Can’t say I have. Curious, what are you using to do the import/export?
Munkhbayar
@munkhbayaryo

Hello,
I'm using cmb object type as page, purpose for theme option.
'object_types' => array( 'page' ),

But can't display in post loop.
if ( have_posts() ) : while ( have_posts() ) : the_post(); if(get_post_meta( get_the_ID(), 'CUSTOM FIELD', 1 )) { echo "YES!"; } endwhile; endif;

Outside of post loop works ok, anyone please help me.

Jeremy Turowetz
@jerturowetz
Hey gang, just wondering if there's an option for the file type to turn off the preview. Can't find it in the docs.
Justin Sternberg
@jtsternberg
there is no such option
Matthew Aubie
@matthewaubie
Hey everyone -- is there a way to set the metabox attribute based on the user role?
Justin Sternberg
@jtsternberg
I might need you clarify. Which attribute?
Matthew Aubie
@matthewaubie
readonly
I want some metaboxes to be editable by admins, but not editable by authors
Justin Sternberg
@jtsternberg
Have you seen these examples? https://github.com/CMB2/CMB2/wiki/Adding-your-own-show_on-filters They demonstrate how to conditionally show a metabox, though makeing it readonly would require some different code.
valanarasug
@valanarasug
how to change button caption on add or upload file button
Iisakki Ronkainen
@IisakkiR_twitter
Hey, is it possible to put repeatable group inside repeatable group?
Justin Sternberg
@jtsternberg
Unfortunately it’s not.
Bizzy81
@Bizzy81
Does this plugin send any info it shares with third parties? Many free plugins does that, so I am just wondering.
Justin Sternberg
@jtsternberg
It does not.
Elmadi
@Elmadi
Hi. I am working on wordPress plugins. Since the last times i am looking for how can i add a metabox to one front-page but i still have not been able to do it. i had this error "call to undefined function add_meta_box(). in the template where i wand add the meta i have this: <?php do_action('dcd_h', $object_id); ?> and in my plugin i have add_action('dcd_h','fun_dcd_settings'); function fun_dcd_settings(){ add_meta_box('id_dcd', __('DCD - Settings '),'dcd_basic_metabox', 'product', 'normal', 'high');} function dcd_basic_metabox(){echo '<input type="text" />';}
Elmadi
@Elmadi
i passed more han one week on this topic please help me. Thanks
Justin Sternberg
@jtsternberg
Please open a support request on the plugin’s Wordpress.org support forums.
Justin Sternberg
@jtsternberg
Ravi Gehlot
@ravigehlot
How can I enable revisions for repeaters?
SAMEH ELSHAL
@samehelshal_twitter
i created many custom types using cmb2 but there an error when show single post type it redirect me to the error page
abayomiabayomi
@abayomiabayomi
Hello all
how can I sum 2 meta_value(s) to get a result list for a column in my post list?
i do not want to display the meta values in 2 separate columns, i want the two values(numbers) summed up for one single column
Sebastillar
@sebastillar_twitter

Hi everybody. I've already implements this code:
function cmb2_post_search_ajax_metaboxes_example() {

$example_meta = new_cmb2_box( array(
'id' => 'cmb2_post_search_ajax_field',
'title' => __( 'Related Posts', 'cmb2' ),
'object_types' => array( 'movie' ), // Post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
) );

$example_meta->add_field( array(
'name' => ( 'Example Multiple', 'cmb2' ),
'id' => 'cmb2_post_search_ajax_demo_multiple',
'type' => 'post_search_ajax',
'desc' =>
( '(Start typing post title)', 'cmb2' ),
// Optional :
'limit' => 10, // Limit selection to X items only (default 1)
'sortable' => true, // Allow selected items to be sortable (default false)
'query_args' => array(
'post_type' => array( 'movie' ),
'post_status' => array( 'publish' ),
'posts_per_page' => -1
)
) );

$example_meta->add_field( array(
'name' => ( 'Example Single', 'cmb2' ),
'id' => 'cmb2_post_search_ajax_demo_single',
'type' => 'post_search_ajax',
'desc' =>
( '(Start typing post title)', 'cmb2' ),
// Optional :
'limit' => 1, // Limit selection to X items only (default 1)
'sortable' => false, // Allow selected items to be sortable (default false)
'query_args' => array(
'post_type' => array( 'movie' ),
'post_status' => array( 'publish' ),
'posts_per_page' => -1
)
) );

}
add_action( 'cmb2_init', 'cmb2_post_search_ajax_metaboxes_example' );

But WordPress admin doesn't render the input fields
somebody with same issue?
Sebastillar
@sebastillar_twitter
I resolve this issue!