Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Thomas,
That's the intended purpose. The color picker should act like a popup and should not change the height of the outer element (tab panel in this case). Because that might make the layout "dance" when we toggle the picker. And that's a bad experience if we're in a group.
Anh Tran
KeymasterHi Dan,
- The compatibility with WPML probably is better than Polylang. We have official support from WPML team, and they contributed code to Meta Box. Polylang follows WPML and supports the same thing as WPML does, so it's compatible.
- There's nothing special with WPML. Please just follow its documentation. I think one thing most people forget is the language configuration file. So, be sure you check it.
Cheers,
AnhAnh Tran
KeymasterHi Dan,
All the settings for admin columns are listed in the docs. And in the Builder, you can set the params using dot notation.
For example:
- If you just want to show the field in the admin column, set a custom attribute
admin_columnstotrue. - If you want to show the field before
namecolumn (like I did in the previous comment), set a custom attributeadmin_columnstobefore name. - If you want to show the field before
namecolumn and has a custom title "Featured Image", then use the dot notation to set a custom attributeadmin_columns.position' to 'before name', and another custom attributeadmin_columns.title' to "Featured Image".
Anh Tran
KeymasterHi Thomas,
I've just added
tab_default_activesetting in version 1.1.0. You just need to set'tab_default_active' => 'tab_id'in the meta box settings!July 26, 2018 at 11:25 AM in reply to: Get all field values into a public array and filter with page id in front end #10727Anh Tran
KeymasterHi,
Can you check if you register meta boxes under any condition such as
is_admin()or inside a hook? It's required to put the code that register meta boxes (add_filter('rwmb_meta_boxes', ...)) not inside any condition.The
rwmb_get_registryreturns a registry, e.g. a storage, of all registered meta box objects. You can use that registry to get all meta boxes viaget( 'all' )method.The statement:
$meta_boxes = rwmb_get_registry( 'meta_box' )->get( 'all' );actually means:
$meta_box_registry = rwmb_get_registry( 'meta_box' ); $meta_boxes = $meta_box_registry->get( 'all );To get meta values for a specific page ID, please use the 3rd parameter in the helper functions:
$value = rwmb_meta( 'field_id', '', $page_id );For more info, please read the docs.
Anh Tran
KeymasterHi Dan,
- You can find the info for MB Columns extension here. I understand that there's no explanation in the Builder. I'll think more about updating the Builder to make it clear.
- I created a simple single image field and added custom attribute like this:
https://imgur.elightup.com/AjGtbrS.png
And here is the result:
Anh Tran
KeymasterHi Thomas,
I'm checking and fixing it. Sorry for not letting you know.
PS: Version 1.1.0 has fixed this. Please update.
Anh Tran
KeymasterHi Neil,
I answered you via email, but probably you haven't received it.
Regarding your case, I think you can insert the value inline in 2 ways:
- Using the built-in shortcode. Meta Box already has a shortcode for displaying the custom field value. Please see more details in the docs.
- Or using the integration with BB Themer. It has the "Insert" button (close to the "Connect" button), which insert a shortcode to the text/heading module. It acts exactly like a shortcode and you can use it to insert custom field value inline.
I hope that works for you. If it still doesn't, please let me know.
Anh Tran
KeymasterI got it. So your main purpose is not writing different IDs for groups.
While this is not recommended, but I think it still works with the current version of Groups. I mean you can set the same ID for sub-fields in different groups. And then you can access to them using the same keys. It should work in most cases. Please just test it.
Anh Tran
KeymasterYes, it's possible.
When you create a settings page with MB Settings Page, remember to set the
option_nametotheme_mods_$themeslug. Then all the settings in the customizer will be available for the settings page and vise versa.For more info, please see the docs.
July 25, 2018 at 5:28 PM in reply to: Get all field values into a public array and filter with page id in front end #10711Anh Tran
KeymasterHi,
Yes, you can extend the meta box objects. Please use this snippet to get all meta box instances:
$meta_boxes = rwmb_get_registry( 'meta_box' )->get( 'all' ); foreach ( $meta_boxes as $meta_box ) { // Do whatever you want }Then you can filter, add/remove more settings to meta boxes. The meta box registry contains all references to real meta box objects. So be careful. Because what you change will affect the whole code.
PS: Using the filter
rwmb_meta_boxesjust gives you a copy of array of meta box settings, not real meta box objects.July 25, 2018 at 5:13 PM in reply to: Unable to exclude metabox field with MB Include Exclude #10710Anh Tran
KeymasterIt's a good alternative solution!
Anh Tran
KeymasterHi,
The plugin's shortcode doesn't support all
wp_login_form()parameters at the moment. I'll update to support them.Anh Tran
KeymasterHi Dan,
Please use the Custom Attributes for the image_advanced field. The Columns settings is for MB Columns extension.
Anh Tran
KeymasterI got it. You still can save image in the database by encoding it. Use a tool like this, or base64_encode function to convert the image file into a text string. Then you can save it. However, you need to handle outputting the image by decoding it, because the value stored is the encoded data, not the real image.
-
AuthorPosts