Forum Replies Created
-
AuthorPosts
-
October 29, 2022 at 12:11 PM in reply to: 2 newbie questions: Elementor single post template and properly storing numbers #38883
Long Nguyen
ModeratorHi Ian,
Thanks for getting in touch.
1. The issue with the post type is not found on the frontend might relate to the permalink settings. Please go to admin area > Settings > Permalinks > Resave permalink settings (Post name) and recheck this issue.
2. Regarding the price field, Meta Box does not support a field like that. You can use a third-party plugin to use the price field. Please find it here https://github.com/badabingbreda/field-text-multimask
Long Nguyen
ModeratorHi,
So you can see the table name in the argument is not correct, please change it to
$args = [ 'storage_type' => 'custom_table', 'table' => 'author_single_image_db', // table name 'object_type' => 'term' ];Let me know how it goes.
Long Nguyen
ModeratorHi,
Can you please share the code that creates the custom fields on your site? Refer to this solution https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Long Nguyen
ModeratorHi,
After using the plugin https://wordpress.org/plugins/health-check/
to enable the troubleshooting mode (deactivate all plugins except Meta Box, MB AIO) and I can set the image for the field single_image as well. So it could be a conflicting issue with another plugin. You can try to deactivate all plugins except Meta Box, MB AIO then activate them one by one to find the culprit.Long Nguyen
ModeratorHi,
Please share your site credentials via this contact form https://metabox.io/contact/
and some screenshots/details of the issue. I will help you to check the issue.October 28, 2022 at 11:13 AM in reply to: ✅Translate "This field is required." on "mb_user_profile_login" shortcode #38869Long Nguyen
ModeratorHi,
You can use filter hook
rwmb_profile_login_fieldsto add the custom HTML5 attributetitleto the field and change the required message. For example:add_filter( 'rwmb_profile_login_fields', function( $fields ) { $fields['username']['attributes'] = [ 'title' => 'Username required text' ]; $fields['password']['attributes'] = [ 'title' => 'Password required text' ]; return $fields; } );Read more on the documentation https://docs.metabox.io/custom-attributes/
https://www.w3schools.com/tags/att_global_title.aspLong Nguyen
ModeratorHi,
Here is an example code to get the term meta from the custom table
$args = [ 'storage_type' => 'custom_table', 'table' => 'my_table_name', 'object_type' => 'term' // here ]; $value = rwmb_meta( 'field_id', $args, $term_id ); echo $value;As I said before, the WP function
get_term_meta()will not work in this case.foreach( $term_ids as $term_id ) { $args = [ 'storage_type' => 'custom_table', 'table' => 'properties', // table name 'object_type' => 'term' // require to add this argument, see here https://docs.metabox.io/extensions/mb-term-meta/#getting-field-value ]; $image_id = rwmb_meta( 'author_image_db', $args, $term_id ); // if the field is single_image, no need to use the for loop $image = RWMB_Image_Field::file_info( $image_id, array( 'size' => 'thumbnail' ) ); echo '<img src="' . $image['url'] . '">'; }Long Nguyen
ModeratorHi,
For example: the field Date Of Birth has the ID
date_of_birthand the field Age has the IDage, the code to update the fieldageafter saving the fielddate_of_birthshould be:add_action( 'rwmb_date_of_birth_after_save_field', function ( $null, $field, $new, $old, $object_id ) { // $new is the date_of_birth field value $age_value = $new; // your function to calculate the age here update_post_meta( $object_id, 'age', $age_value); }, 10, 5 );October 27, 2022 at 10:51 PM in reply to: ✅Switch field inside the group - Content visibility & required condition #38861Long Nguyen
ModeratorHi,
Thanks for your additional information.
The nested logic in this case is not working correctly. I've escalated this to the development team to fix it in the next update.
Long Nguyen
ModeratorHi,
It looks like the arguments passed to the get_terms() function are not correct. It should be
$args = array( 'taxonomy' => 'album-fotografie', 'hide_empty' => 0, ); $terms = get_terms( $args );This works as well on my demo site. Please read more on the documentation https://developer.wordpress.org/reference/functions/get_terms/
Long Nguyen
ModeratorHi Mirko,
Please submit a ticket here https://metabox.io/contact/
our marketing team will help you with the best.October 27, 2022 at 10:04 PM in reply to: ✅Add an edit post button in relashionship - Request feature #38858Long Nguyen
ModeratorHi,
Thank you for your suggestion. This feature request is in our development queue and the development team is working on it. Hopefully, it will be available soon.
Long Nguyen
ModeratorHi,
It's so weird, I do not see any issue when using this code to output the checkbox list value/label
{% for item in post.checkbox_list_id%} {{ item.label }} - {{ item.value}} {% endfor %}Can you please share the code that creates the checkbox list field on your site?
October 27, 2022 at 3:25 PM in reply to: ✅Switch field inside the group - Content visibility & required condition #38851Long Nguyen
ModeratorHi,
Please follow this documentation to know how to use conditional logic with subfields in a group https://docs.metabox.io/extensions/meta-box-conditional-logic/#using-with-group
Long Nguyen
ModeratorHi Alaan,
Please follow this topic to remove the Meta Box menu if a user is not the administrator https://support.metabox.io/topic/hiding-meta-box-plugin-from-wordpress-dashboard-menu-for-non-admins/
-
AuthorPosts