Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHello,
The Gutenberg plugin changes HTML markup and breaks the current code. We haven't updated the code for post format yet. Gutenberg can change the markup anytime until it's stable (merged into core). We'll keep working on that to make the conditional logic works.
Anh Tran
KeymasterHi Michael,
We're working on this feature. When it's done, you'll be able to copy & paste the options into a textarea. No need to enter each option one by one.
The tab requires MB Tabs extension. When you activated the extension, you can add tabs like in this screenshot:
https://imgur.elightup.com/pQSMp7c.png
And they will display like this:
August 8, 2018 at 3:19 PM in reply to: "std" => "" value dissapears on text when text_list or key_value is set to clone #10920Anh Tran
KeymasterHi Mauro,
Maybe Composer caches the packages. I always run these 2 commands together:
composer clear-cache && composer installAugust 8, 2018 at 2:30 PM in reply to: Adding The Event Calendar custom fields via + connector in Beaver Themer #10918Anh Tran
KeymasterHi Marge,
I've just tested with The Events Calendar plugin and I see all custom fields for events are showing in the Themer. Here is my screenshot:
https://imgur.elightup.com/K6Y6fAa.png
How did you set it up?
Anh Tran
KeymasterHi Thomas,
The background field saves details into an array. If you use the helper function
rwmb_meta()to get its value - you'll get an array.To get the generated CSS for the background, please use the function
rwmb_the_value().This is the sample code:
$bg = rwmb_meta( 'field_id' ); echo $bg['color']; // Output a single background attribute // Get CSS for background $css = rwmb_the_value( 'field_id', '', '', false ); echo $css;August 6, 2018 at 4:05 PM in reply to: Edit _Post custom field combine 2 field and add to a field #10898Anh Tran
KeymasterList of actions are available in the documentation.
To add small HTML and JS just below a field, you can use the
afterparam of the field. See field settings for more details.Anh Tran
KeymasterHey guys. Thanks a lot for your details. Let me check Jason's code first. Looks like it's more complicated than I thought.
August 6, 2018 at 3:13 PM in reply to: looking for action or filter to remove user profile shortcode configs #10894Anh Tran
KeymasterHi Dan,
Can you please give me more details on how the
$configcan include all username, password? I'm quite confused how$configis related to the validation banner.August 6, 2018 at 2:00 PM in reply to: Edit _Post custom field combine 2 field and add to a field #10892Anh Tran
KeymasterHi, to combine values of 2 fields when saving, please use this snippet:
add_action( 'rwmb_after_save_post', function( $post_id ) { if ( isset( $_POST['field_1'] ) && isset( $_POST['field_2'] ) ) { $value = $_POST['field_1'] . $_POST['field_2']; update_post_meta( $post_id, 'field_combine', $value ); } } );This snippet combines the values of field_1 and field_2 into field_combine.
To add JS to a meta box, please use this snippet:
add_action( 'rwmb_enqueue_scripts', function() { wp_enqueue_script( 'your-script', 'https://url-to-your-js-file', array( 'jquery' ), '', true ); } ):Anh Tran
KeymasterHi,
The text domain is used for translating the labels when you setup a multilingual website. If your website is not multilingual, you can skip it (by entering any value). Read more about it here.
Anh Tran
KeymasterHi,
Basically, the snippet change the post data before it's saved to the database. In this case, it set the comment status to
closedfor all submitted posts.If you want to make a checkbox for toggling comment status, you can add a checkbox field to the meta box and change the condition to something like this:
// change // if ( 'meta-box-id' == $config['id'] ) { // to if ( 'meta-box-id' == $config['id'] && !empty( $_POST['checkbox_id'] ) ) {August 5, 2018 at 3:09 PM in reply to: Edit _Post custom field combine 2 field and add to a field #10881Anh Tran
KeymasterHello,
Can you please give me more details on combining two fields into one? Do you mean combining the values when saving?
August 5, 2018 at 3:08 PM in reply to: ✅cant add metabox for custom post types with mb builder #10880Anh Tran
KeymasterHi,
This happens with an old date metabox that i created
Can you check the status of those meta boxes? Make sure they're published. You can check in the phpMyAdmin as well.
And i try to import metabox to a new fresh install but i cant. After try to import i am gettiong error like this: Cannot load meta-box-import.
Did you use the export/import functionality from the Builder?
August 5, 2018 at 3:02 PM in reply to: "std" => "" value dissapears on text when text_list or key_value is set to clone #10879Anh Tran
KeymasterI got it. I was looking for the
stdoftext_listfield.By the way, the
stdis used only when the post hasn't been saved. Once it's saved, the values are stored in the DB and will be used next time when page loads.Do you see that happen with new posts?
-
AuthorPosts