Forum Replies Created
-
AuthorPosts
-
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.
Peter
ModeratorHello,
The theme.json doesn't relate to the field settings. If you want to add your style to the field settings, you can try to use this action hook
rwmb_enqueue_scriptsto enqueue your style/script file. Following the documentation https://docs.metabox.io/actions/rwmb-enqueue-scripts/Peter
ModeratorYou can try to apply the fix on your site and see how it goes. Here is the screenshot of the updated code https://imgur.com/gcDbOpP
Peter
ModeratorHello Eddy,
Please share 2 full screenshots: relationship settings and View template. I will help you check the issue.
Peter
ModeratorHello,
The feature request is added to the backlog development queue. Hopefully, it will be available soon.
Thanks.
August 1, 2024 at 9:06 PM in reply to: ✅image_advanced data not stored as multiple rows in database anymore #46074Peter
ModeratorHello,
but still saves the data as serialized as I saidDo you use the option cloneable for the image advanced field? If yes, the field value will be serialized in the database as it is.
Peter
ModeratorHello,
As I mentioned above, the tab doesn't work with the group field as a subfield. I also don't recommend making the cloneable group to pages, it will break the HTML structure of the field. If you want to add a custom HTML field or classes, feel free to test with that.
-
AuthorPosts