Forum Replies Created
-
AuthorPosts
-
August 8, 2024 at 10:37 PM in reply to: ✅Setting up a post type loaction on the custom fields was not saving. #46121
Peter
ModeratorPlease share your site admin account by submitting this contact form https://metabox.io/contact/
I will take a look.Peter
ModeratorHello,
That is expected when using the PHP code to validate, the page will be reloaded and input value will be lost. If you want to validate a field without reloading the page, please use the JS validate https://docs.metabox.io/validation/
Peter
ModeratorHello Eddy,
If you have the student ID, you can use the code below to get the student field (user meta).
{% set student_document = mb.rwmb_meta( 'document_group', { object_type: 'user' }, user.student_id ) %} {% for clone in student_document %} ... {% endfor %}please update the field
document_groupID if it isn't correct. Following the documentation
https://docs.metabox.io/extensions/mb-user-meta/#getting-field-value
and the previous topic https://support.metabox.io/topic/how-to-get-field-value-in-the-settings-page/Peter
ModeratorHello Yasmine,
I tried to reproduce the issue on my end but couldn't see it. Please try to create a new field group with that field and deactivate all plugins except Meta Box, MB extension plugins, switch to a standard theme of WordPress and check the issue again.
August 8, 2024 at 9:25 PM in reply to: How to show relationships in same order as set in backend? #46116Peter
ModeratorHello,
You are using the parameter
orderby:'none'so the relation posts will be displayed with no order. Please remove it and check the issue again.August 7, 2024 at 11:17 PM in reply to: ✅Setting up a post type loaction on the custom fields was not saving. #46110Peter
ModeratorHello Steve,
Do you try to increase the PHP setting
max_input_varsas in other topics? If you activate only Meta Box and MB extension plugins, does this happen again?Peter
ModeratorHello,
The Twig code format isn't correct. Here is an example
{% set repetitie_avond = mb.rwmb_meta( 'repetitie_avond', { object_type: 'setting' }, 'repetitie-avonden' ) %}I recommend you follow the documentation to know how to write the Twig code
https://docs.metabox.io/extensions/mb-views/#twigor use the PHP code as in the documentation https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value
August 7, 2024 at 10:56 PM in reply to: How to show relationships in same order as set in backend? #46108Peter
ModeratorHello Eddy,
The order of relationship items in the front end will display the same order as in the admin area. Can you share some screenshots of the issue and the code that you use to output the relationship?
Peter
ModeratorHello,
- As soon as they have one favorite marked then it only shows one
- It should show no posts when the users has no favorites.You can change this logic code
if ( ! empty( $post_ids ) ) { $query_args['post__not_in'] = $post_ids; // Exclude the post IDs }to
if ( ! empty( $post_ids ) ) { $query_args['post__in'] = $post_ids; // Include the post IDs } else { $query_args = []; }however, I see it is the standard behavior of the shortcode
[mbfp-posts]without any difference. Please follow the documentation https://docs.metabox.io/extensions/mb-favorite-posts/#shortcodesAnd please notice that, supporting the custom code is beyond our scope of support. If you have any issues with the code, you can contact an expert developer to help you or contact us here https://metabox.io/contact/. We offer a customization service with an extra fee.
Peter
ModeratorHello,
There isn't an option to display a number of favorite posts for the current user. You can follow the documentation below to use the code and get the data from the user meta key
mbfp_posts
https://docs.metabox.io/extensions/mb-favorite-posts/#data
and output where you prefer.Peter
ModeratorHello,
The "user's MB favorites" is a table that shows the list of user's favorite posts, how do you use this with the Beaver posts module? Please share a screen record of those steps so I can reproduce the issue on my demo site.
Peter
ModeratorHello Topher,
Unfortunately, the Google map field of Meta Box doesn't support that feature. You will need to create some custom code to do that or use a third-party plugin that supports the distance feature.
Please follow the documentation https://developers.google.com/maps/documentation/javascript/distancematrixPeter
ModeratorHello,
You can change the operator from
isto==to compare the value. The functionget_the_term_list()returns a list of terms so it might not work if you compare to only one term.
Also, the variableresultis not defined anywhere in your code. Please check this again.Peter
ModeratorHello,
You can update the field label. But please be careful when updating the field ID, the value will disappear when editing the old posts.
Peter
ModeratorHello,
Can you check the radio subfield ID? It should have the format: Use only numbers, letters, and underscores (and rarely dashes). Following the documentation https://docs.metabox.io/field-settings/
If it still doesn't work, please share some screenshots of the field settings in the builder. I will help you check the issue with the field.
-
AuthorPosts