Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterPlease follow the instruction in the documentation. Here is a sample code:
$meta_boxes[] = array( 'title' => 'Car Information', 'fields' => array( // Group array( 'name' => 'Car Details', 'id' => 'car_details', 'type' => 'group', 'fields' => array( array( 'name' => 'Model', 'id' => 'model', 'type' => 'text', ), // Other sub-fields here ), ), ), );Anh Tran
KeymasterHi, that’s ok. I’m happy to help you switch to the Developer Bundle. As you paid via Paypal, I can refund you easily. Would you mind purchasing the Developer Bundle and then I can refund you 3 previous payments?
November 29, 2016 at 10:42 PM in reply to: INVOICE for https://metabox.io/plugins/core-extensions-bundle/ #4589Anh Tran
KeymasterJust send me your company’s info via the contact form in the Contact page and I will send you the invoice.
Anh Tran
KeymasterYes, I will do it tomorrow 🙂
November 29, 2016 at 10:40 PM in reply to: How to do about include 'mb-settings-page' in themes? #4587Anh Tran
KeymasterFirst, you need to update the extensions to the latest version. Then you need to include the plugin’s main file. For more info, please check this docs:
https://metabox.io/docs/include-extensions-themes-plugins/
You should also update Meta Box plugin to the latest version. The code above seems too old.
Anh Tran
KeymasterMaybe try replacing the code above with:
add_action( 'init', function() { add_filter( 'rwmb_meta_boxes', 'prefix_register_meta_boxes' ); }, 5 );And check the code to register terms, make sure it's hooked into
initwith priority 0, like this:add_action( 'init', 'prefix_register_tax', 0 );Anh Tran
KeymasterHi Pipo,
You need to use either the extension Conditional Logic or Include Exclude to do that. The Builder extension on its own doesn't support this.
Anh Tran
KeymasterCan you make a screenshot of the settings?
Anh Tran
KeymasterIs there a possibility to see or extract the code?
Maybe just use
var_dumporprint_r?If you don't mind, please give me the post to register meta boxes. I can check that for you.
November 22, 2016 at 4:14 PM in reply to: Choose custom post type from select/checkbox in a settings page #4531Anh Tran
KeymasterMaybe your problem is the same as in this topic, where the post types are not registered when the code runs. You might want to do something like:
add_action( 'init', 'prefix_register_post_types', 0 ); // 0 means high priority add_action( 'init', 'prefix_hooks', 5 ); // Hooks to 5 when all post types are registered. We should not hook to 10 or higher, because Meta Box already run at that time. function prefix_hooks() { add_filter( 'rwmb_meta_boxes', 'prefix_register_meta_boxes' ); }The problem comes when I added compatibility for WPML.
Anh Tran
KeymasterI guess you probably add filter too soon, when the
get_the_termsfunction doesn't exists. You might want to change your code to something like:add_action( 'after_setup_theme', function() { add_filter( 'rwmb_meta_boxes', 'prefix_register_meta_boxes' ); } );This way, your function runs at
after_setup_themewhere all WP functions are available.Anh Tran
KeymasterYes, you should use the extension "MB Include Exclude". It supports to control the visibility of a meta box based on user role.
Anh Tran
KeymasterThe group field doesn't auto turn the oembed URL into the video. To do that, you need to use a helper code, like this:
$url = $group['paragraph_movie']; echo RWMB_OEmbed_Field::get_embed( $url );Anh Tran
KeymasterYou mean when changing
field_type, the returned value changes? Can you post the code to register this field to check? Thanks.Anh Tran
KeymasterThat's correct! I forgot that you're using the Builder extension 🙂
-
AuthorPosts