Forum Replies Created
-
AuthorPosts
-
April 18, 2023 at 6:30 PM in reply to: ✅Can`t update some extentions to latest versions using composer #41527
Peter
ModeratorHello Bart,
Please use this code to update the latest versions of MB plugins with Composer
rm -rf vendor && composer clear-cache && composer installRead more in the documentation https://docs.metabox.io/integration/#why-cant-i-update-with-composer
Peter
ModeratorHello,
I think it is possible. You can create an
ifstatement to set the relationship arguments. For example:if (something) { $relationship = [ 'id' => 'post-provider', 'to' => get_the_ID() ]; } else { $relationship = [ 'id' => 'resource-provider', 'to' => get_the_ID() ]; }then assign the value to the
relationshipkeyreturn array_merge( $query_args, array( 'relationship' => $relationship ) );Peter
ModeratorHello Will,
Please use this code in View to get the switch value and output the field label Yes/No
{% set switch = mb.rwmb_meta( 'vacation_mode', { object_type: 'setting' }, 'vacation' ) %} {{ mb.checkbox( switch, 'Yes', 'No' ) }}Assume that:
vacationis the option name andvacation_modeis the switch field ID.Peter
ModeratorHello,
For tracking the issue easier, I recommend using the function
get_posts()to get posts related to a user.{% set args = { post_type: 'provider', relationship: { id: 'user-provider', from: userID } } %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} ... {% endfor %}The main issue here is you need to pass the correct userID to the arguments to get related posts. Please read more in the documentation https://docs.metabox.io/extensions/mb-relationships/#posts
https://docs.metabox.io/extensions/mb-views/#custom-queryPeter
ModeratorHello,
I do not see that issue on my demo site. Can you please test this issue with a clean installation of WordPress and Meta Box? You can also try to deactivate all plugins except Meta Box, MB AIO, switch to a standard theme of WordPress and see how it goes.
Peter
ModeratorHello Mark,
I do not receive your site information. Can you please resend it?
Also, with the new version of Meta Box AIO 1.20.2 or MB Frontend Submission 4.3.0, you can use the block
[Meta Box] Submission Formto create a frontend form with the Gutenberg block.Peter
ModeratorThank you for sharing the solution.
Peter
ModeratorHello,
The different fields between Google Map and Open Street Map are listed in the section "Other Fields". Both map should use the address field with the ID
addressor something withaddressprefix likeaddress_somethingoraddress_1234. I've changed the field ID to address and the address fields are populated properly, screenshot https://monosnap.com/file/K7RQ7lMeGQSbWP1ySdj0UighcIQuytPeter
ModeratorHello,
Not sure if it can help but I think you can try to use the PHP function array_filter() to filter the value in an array.
https://stackoverflow.com/questions/45778382/how-can-i-filter-values-from-an-array-and-then-sort-them-by-a-custom-orderFurthermore, please contact Bricks builder support to get advanced help.
Peter
ModeratorHello Mark,
Can you please generate the PHP code of the field group assigned to that CPT or you can export the field group to a JSON file and share it here?
There could be an issue with the options of a select field.Peter
ModeratorHello,
Please refer to this topic to apply the SVG icon for the CPT
https://support.metabox.io/topic/custom-post-type-svg-icon-base64-encoded/#post-32132Peter
ModeratorHello,
I understand the question. Unfortunately, Meta Box does not support displaying other field values in the select box, only the post (object) title will be displayed.
Peter
ModeratorHello,
Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.Peter
ModeratorHello,
Thanks for sharing the solution. Really appreciate.
Peter
ModeratorHello,
I run your code on my local site but do not see that issue. It is possible the template in the plugin is executed before the code that registers the meta box then there is no meta box to render.
-
AuthorPosts