Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
I run the PHP code on my demo site and do not see that issue, here is the screenshot https://monosnap.com/file/rhqjAvQUExFP6YXFew24az4uNtSKiO
Do you have any user meta field on your site?
March 28, 2023 at 7:38 PM in reply to: ✅Syncing Group Taxonomy Advanced Field with a Taxonomy Field #41246Peter
ModeratorHello,
For example, I have a taxonomy field and a taxonomy_advanced subfield in a group field, like this
$meta_boxes[] = [ ... 'fields' => [ [ 'name' => __( 'Taxonomy', 'your-text-domain' ), 'id' => 'taxonomy_field', 'type' => 'taxonomy', 'taxonomy' => ['drink-recipe'], 'field_type' => 'select_advanced', ], [ 'name' => __( 'Group', 'your-text-domain' ), 'id' => 'group_field', 'type' => 'group', 'fields' => [ [ 'name' => __( 'Taxonomy Advanced', 'your-text-domain' ), 'id' => 'taxonomy_advanced_field', 'type' => 'taxonomy_advanced', 'taxonomy' => ['drink-recipe'], 'field_type' => 'select_advanced', ], ], ], ], ];Then the code to set the post term from the taxonomy_advanced field would be:
add_action( 'rwmb_group_field_after_save_field', function ( $null, $field, $new, $old, $object_id ) { $term_id = (int)$new['taxonomy_advanced_field']; wp_set_object_terms( $object_id, $term_id, 'drink-recipe' ); }, 10, 5 );This is the example code, if it does not work on your site, please contact us with the link below and request a customization service, our development team will help you to check the issue.
https://metabox.io/contact/Peter
ModeratorHello,
I do not see that issue on my end. Can you please export the field group or generate the PHP code and share it here? You can also try to deactivate all plugins and leave only Meta Box, MB extensions activate, switch to a standard theme of WordPress and check this issue again.
Peter
ModeratorHello,
Please refer to this topic https://support.metabox.io/topic/changing-the-post-title-slug-after-front-end-submissions-based-on-fields/?swcfpc=1
to update the post title with a custom field value.March 28, 2023 at 6:49 PM in reply to: ✅Changing the Post Title/Slug after front-end submissions based on fields #41242Peter
ModeratorHello,
Follow the documentation, you can get the post type and post ID from the
$objectvariable. For example:add_action( 'rwmb_frontend_after_save_post', 'update_cats_post_title'); function update_cats_post_title( $object ) { $post_type = $object->post_type; $post_id = $object->post_id; if ( 'cats' == $post_type ) { ... } }https://docs.metabox.io/extensions/mb-frontend-submission/#post-actions
Let me know how it goes.
Peter
ModeratorHello,
Thank you for your details. In general, I think the issue is not on the side of Meta Box. What Meta Box supports here is a custom post type and custom fields to display on the frontend. I'm not sure what option or feature you are using on your local site to filter the post (location) automatically based on moving the map. I suggest you can contact WP Gridbuilder to ask for help with this issue.
You can also update the locations in bulk by going to admin area > Location > Bulk select posts > Edit > Just click on Update, see this screenshot https://monosnap.com/file/dzKzxaT4aOBA4GEDBcbJjH12pP6MNE
March 27, 2023 at 11:03 PM in reply to: ✅CPT, Custom Taxonomy with added image field: how do I get the image? #41233Peter
ModeratorHello,
It's an array of term objects so you need to use a loop to get each term ID. In this case, you can use the sample code to get the author images:
$images = rwmb_meta( 'tax_image', [ 'object_type' => 'term', 'size' => 'thumbnail' ], $terms[0]->term_id );March 27, 2023 at 9:16 PM in reply to: Type File and validation of MIME types: how does it work? #41231Peter
ModeratorHello,
I also see it does not work on my demo site. I'm asking our development team to check the issue and get back to you later.
March 27, 2023 at 8:38 PM in reply to: How to move 4000+ custom posts in a new custom table? Please help #41229Peter
ModeratorHello,
>> So, what will be the code in my case?
You don't need to change the function name, just copy it to your theme or child theme folder. After migrating data, you can delete the code then.>> Do I need to write Parent Theme Name or Child Theme Name and how? Should I write WP_Astra or WP Astra while writing the theme name, if it’s parent theme?
You can add the code to the main theme or child theme, both of them are ok.>> The given code at https://metabox.io/move-custom-fields-data-to-custom-tables/ only provides the example for post_type ( companies ) but not for Taxonomies.
You can change the post type to your post type (tool). But for the taxonomy, the code will be different. Because it is beyond our scope of support to provide a custom code for your specific needs. You can contact us here to request a customization service https://metabox.io/contact/Peter
ModeratorHello,
MB Frontend Submission does not support displaying a multi-step form. You can try to create some custom JavaScript code to show/hide the part of form or tabs when clicking on the next/previous button.
March 27, 2023 at 8:20 PM in reply to: Why there's no function to get the fields out of a field group? #41227Peter
ModeratorHello,
Meta Box does not support a function to get all fields of a field group like that. You can use the function
get_post_meta()to get all post meta associated with a post. Please follow the documentation
https://developer.wordpress.org/reference/functions/get_post_meta/March 27, 2023 at 8:13 PM in reply to: Prefill Custom fields from other custom fields in a different CPT #41226Peter
ModeratorHello,
There is no option to prefill the field value from another field after selecting the Template CPT. You can try to use the action hook
rwmb_after_save_postto update the field value (post meta) after saving the post.Please follow the documentation https://docs.metabox.io/actions/rwmb-after-save-post/
March 27, 2023 at 8:05 PM in reply to: Beaver Builder image gallery connection to Metabox field #41225Peter
ModeratorHello,
The problem is resolved. The error happens when using the cloneable image_advanced field, it is not compatible with the current version of MB Beaver Themer Intergrator.
March 27, 2023 at 8:03 PM in reply to: ✅CPT, Custom Taxonomy with added image field: how do I get the image? #41224Peter
ModeratorHello,
Can you please print out the variable
$termsto see what value it is stored?Peter
ModeratorHello Jochen,
I do not understand your question clearly. WordPress does not support using Gutenberg editor to create the category or taxonomy item like in your screenshot. The field wysiwyg also does not support using Gutenberg editor in the field content.
-
AuthorPosts