Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Catharina,
You can create a View with Type: Shortcode, use the custom query to show list posts of a custom post type then add the shortcode to any page to show the list.
Please read more on the documentation https://docs.metabox.io/extensions/mb-views/#custom-query
https://docs.metabox.io/extensions/mb-views/#typeNote: A basic knowledge about WP Query is needed to query posts.
https://developer.wordpress.org/reference/classes/wp_query/February 26, 2022 at 9:52 PM in reply to: Import Multiple Choices to Select Field or Checkbox List #34161Long Nguyen
ModeratorHi Andy,
Each value of the field
checkbox_listorselectwith setting'multiple' => trueis stored in a single row in the database with the same meta key (similar to whatadd_post_metadoes with last parameterfalse), screenshot https://monosnap.com/file/Em7r1HjvsyngsV9vXzAOiv81f2bPBoYou can try to contact WP All Import support to ask how to import this data type.
Long Nguyen
ModeratorHi,
Please try to follow this article to increase the PHP setting
max_input_vars
https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/Let me know if it helped.
February 26, 2022 at 11:01 AM in reply to: ✅Get extra info with MB Frontent submission on a Woocommerce product - possible? #34150Long Nguyen
ModeratorHi Stan,
I'm afraid it is beyond the support of Meta Box. Meta Box doesn't not support creating a form on the product page to collect product info and add them to the product data. You might need to use another plugin to do that.
February 26, 2022 at 10:39 AM in reply to: ✅Latest Update of this and Beaver Builder seem to be killing the settings #34149Long Nguyen
ModeratorHi Eric,
Please share your site credentials via this contact form https://metabox.io/contact/. I will take a closer look.
February 26, 2022 at 10:14 AM in reply to: ✅Profile picture not showing in elementor template #34148Long Nguyen
ModeratorHi,
Your code works as well on my local site without an error message.
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Profile', 'your-text-domain' ), 'id' => 'academic_profile', 'tab_style' => 'box', 'type' => 'user', 'tabs' => [ 'basic_info_tab' => [ 'label' => 'Basic Info', 'icon' => 'dashicons-admin-users', ], ], 'fields' => [ [ 'name' => __( 'Profile Picture', 'your-text-domain' ), 'id' => $prefix . 'profile_picture', 'type' => 'single_image', 'force_delete' => true, 'tab' => 'basic_info_tab', ], ], ]; return $meta_boxes; } add_filter( 'get_avatar_url', 'mbua_get_avatar_url', 10, 3 ); function mbua_get_avatar_url( $url, $id_or_email, $args ) { if ( is_numeric( $id_or_email ) ) { $user_id = $id_or_email; } elseif ( is_string( $id_or_email ) && ( $user = get_user_by( 'email', $id_or_email ) ) ) { $user_id = $user->ID; } elseif ( is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) ) { $user_id = (int) $id_or_email->user_id; } if ( empty( $user_id ) ) { return $url; } $custom_avatar = rwmb_meta( 'profile_picture', [ 'object_type' => 'user' ], $user_id ); if ( ! $custom_avatar ) { return $url; } $url = $custom_avatar['full_url']; return $url; }Long Nguyen
ModeratorYes, it is correct. Can you please confirm it works?
February 25, 2022 at 9:49 PM in reply to: Hide frontend form submission button based on user role #34140Long Nguyen
ModeratorHi,
You can print some CSS/JS code to hide/remove the submit button at this action hook. For example:
add_action( 'rwmb_frontend_before_submit_button', function( $config ) { if( !is_user_logged_in() ){ //check user role here ?> <style> .rwmb-button-wrapper.rwmb-form-submit { display: none; } </style> <?php } }, 10 );Long Nguyen
ModeratorHi,
Can you please share the code that creates the custom fields and the code that filter the avatar URL? I will help you to check the issue.
Long Nguyen
ModeratorHi,
On the archive template of your theme, you can add the helper function to show other field values. For example:
$value = rwmb_meta( 'field_id', '', $post_id ); echo $value;Please read more on the documentation https://docs.metabox.io/rwmb-meta/
https://docs.metabox.io/displaying-fields/Long Nguyen
ModeratorHi Fernando,
The builder uses Rest API to create/edit the field group (post type). It is possible that there is a problem with the Rest API on your site. You can go to Tools > Site Health and check the Rest API status on your site.
Refer to this article to know how to fix it https://meowapps.com/fix-wordpress-rest-api/February 25, 2022 at 9:54 AM in reply to: ✅Add custom fields to Woocommerce Order Email upon purchase #34128Long Nguyen
ModeratorHi,
You can contact WooCommerce support to ask for a hook on the Cart, Checkout page and when sending the email to output the field value of the product. Just like on this article https://metabox.io/add-custom-fields-for-woocommerce/
Long Nguyen
ModeratorHi,
Please follow this documentation to know how to output the field value https://docs.metabox.io/displaying-fields/
The URL field helps you to add different URLs for each post instead of adding hard code to the template file.
Long Nguyen
ModeratorHi,
Yes, it will work with post_content or other post elements. Please read more on the documentation https://developer.wordpress.org/reference/functions/wp_insert_post/
Long Nguyen
ModeratorOk, your site info was deleted. Let me know if you have any questions.
-
AuthorPosts