Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
You can use the sample code to create a relationship between to post types.
add_action( 'mb_relationships_init', function() { MB_Relationships_API::register( [ 'id' => 'attendance_leerling', 'from' => 'attendance', 'to' => 'leerling', ] ); } );A meta box will be shown in each post of post type Attendance and you can connect to other posts of post type Leerling with the list post title. See my sample screenshot https://share.getcloudapp.com/wbuWXdRZ.
For more information, please follow the basic usage and the syntax.
Long Nguyen
ModeratorHi @pza,
We have the plan to rebuild the MB Builder by React to reduce the loading time when creating the field group. Please wait for the big update in the next time.
Thank you.
Long Nguyen
ModeratorHi John,
I'm following the same question in a topic from Facebook Group. The answer, in short, is impossible. The relationship only saves the data in the table
mb_relationships. It helps you to connect posts, terms, and users while the main purpose of the extension Custom Table is to help you to save custom fields’ values to the custom table instead of the default WordPress meta table.Long Nguyen
ModeratorHi Bernhard,
If you want to insert some HTML code to the field
WYSIWYG, please switch to the tab Text then type the HTML code. See my screenshot https://share.getcloudapp.com/P8ueQpLJ.Long Nguyen
ModeratorHi John,
A basic relationship is the many-to-many type and the relationship data is stored in a different table
mb_relationships. For more information, please follow the documentation.Long Nguyen
ModeratorHi,
The theme uses the CSS code to display the image as a background cover image that's why I need to check the code and the code in my previous reply uses the CSS code to override the theme's style. See my screenshots for more information.
https://share.getcloudapp.com/yAuYkK7x
https://share.getcloudapp.com/NQugxNkZLong Nguyen
ModeratorHi,
We are trying to research and create an update for MB Builder to cover this case. At this time, please try to use the code to create the zero value for the field
button_group.For more information, please follow the docs https://docs.metabox.io/fields/button-group/#sample-code.
June 27, 2020 at 10:28 AM in reply to: ✅Forcing Field Values Based on Other Field Entries - Dynamic Population #20526Long Nguyen
ModeratorHi,
It is impossible, the main purpose of conditional logic is to show/hide a meta box/field base on other fields' values. So the field's value after showing does not relate to the main field's value.
But thanks for your idea, I'm going to create a feature request for the developer team to research and cover this case.
Long Nguyen
ModeratorHi,
Fields
textandtextareause the functionwp_kses_post()to sanitize the input value. And the option'sanitize_callback' => 'none'works well with these fields.Please see my screen record https://www.loom.com/share/5322db2599624d43a775665ef0c438e9. I've just checked with the
<script>tag which does not pass the sanitization by default.For more information, please follow the documentation.
https://developer.wordpress.org/reference/functions/wp_kses_post/
https://docs.metabox.io/sanitization/Long Nguyen
ModeratorHi Eddy,
I've checked the code of the theme Materialis Pro and find a way to change the default background image of the archive page with the image of a custom field.
- Create a simple image field such as
single_imageand assign it to a taxonomy. - Add this code to the file functions.php in the child theme folder.
add_action( 'materialis_before_header_background', function() { $term_id = get_queried_object_id(); $feature_image = rwmb_meta( 'single_image', array( 'object_type' => 'term' ), $term_id ); if( !empty( $feature_image ) ) { ?> <style type="text/css"> .header-wrapper .header { background-image: url(<?php echo $feature_image['full_url']?>) !important; } </style> <?php } } );For more information, please follow the documentation below.
https://docs.metabox.io/extensions/mb-term-meta/#getting-field-value
https://docs.metabox.io/fields/single-image/Long Nguyen
ModeratorHi,
To change the user email, please use the field
email, and field ID must beuser_email. See more in my screen record https://www.loom.com/share/47fe2edd09dd4cc6ba2aacb9a98d0f6f.And follow this documentation https://docs.metabox.io/extensions/mb-user-profile/#edit-profile-form.
Long Nguyen
ModeratorSee more in my screen record when I check the slide with Inspect Elements https://www.loom.com/share/4766c2c25cdd4a7e99fb19cab910f598.
Long Nguyen
ModeratorHi Anchen,
The slider is created by Elementor page builder so this question needs a response from Elementor support.
Let me know if there is any information.
Long Nguyen
ModeratorHi Eddy,
What is the theme that you are using? If it is premium theme, please send a copy of this theme to this support form https://metabox.io/contact/. I can help you to replace the header image with the image of the custom field after looking into the code of the theme.
Long Nguyen
ModeratorHi,
Because the type of the field is
postso the helper functionrwmb_the_value()always returns the title of the post wrapped in the<a>tag to link to the post.You can use the function
get_the_title()to show only the post title base on the post ID which returned by the helper functionrwmb_meta().$select_advanced = rwmb_meta( 'cpu_model_06x5z89bthw' ); echo get_the_title( $select_advanced );For more information, please follow the document below.
https://developer.wordpress.org/reference/functions/get_the_title/
https://docs.metabox.io/rwmb-the-value/ - Create a simple image field such as
-
AuthorPosts