Forum Replies Created
-
AuthorPosts
-
July 27, 2023 at 8:59 PM in reply to: ✅Single Image in settings page to be added to a page or post custom field. #42764
Peter
ModeratorHello,
I think it's good, except for one point, it could not work because the settings page is not a post type. So you should remove this condition
get_post_type( $object_id ) === 'settings_page'Peter
ModeratorHello,
If a field
training_categoryorcommunity_categoryis shown/hidden by another conditional logic then the second logic does not work. This issue has been escalated to the development team and they are still working on it. Hopefully, it will be fixed soon.Peter
ModeratorHello Joe,
First, you need to remove the default product description and product excerpt by using this code
add_action( 'init', function () { remove_post_type_support( 'product', 'editor' ); } ); function remove_short_description() { remove_meta_box( 'postexcerpt', 'product', 'normal'); } add_action('add_meta_boxes', 'remove_short_description', 999);Then register two custom fields with the ID
contentandexcerptand put them anywhere in a field group then assign the field group to the Product post type.$meta_boxes[] = [ 'title' => __( 'Product meta', 'your-text-domain' ), 'id' => 'product-meta', 'post_types' => ['product'], 'fields' => [ [ 'name' => __( 'Product Content', 'your-text-domain' ), 'id' => 'content', 'type' => 'wysiwyg', ], [ 'name' => __( 'Product Excerpt', 'your-text-domain' ), 'id' => 'excerpt', 'type' => 'wysiwyg', ], ], ];July 26, 2023 at 10:01 PM in reply to: ✅Dynamically populate the options of a select custom field, base on global CF #42757Peter
ModeratorHello,
Meta Box supports adding the value in the admin area and outputting it in the frontend. In your case, it is possible. You can output all descriptions in your form and show/hide each description based on the type of travel selection with Javascript code, like tabs/accordion.
Read more in the documentation https://docs.metabox.io/extensions/mb-settings-page/
July 26, 2023 at 9:51 PM in reply to: ✅Single Image in settings page to be added to a page or post custom field. #42756Peter
ModeratorHello,
If you want to update the image on the settings page to the image custom field on a/some posts, you can try to use the action hook
rwmb_{$field_id}_after_save_field. Follow the documentation https://docs.metabox.io/actions/rwmb-after-save-field/If you just want to display the image on the frontend, you can use the shortcode. For example:
[rwmb_meta id="image_field_id" object_id="settings_page_option" object_type="setting"]Follow the documentation https://docs.metabox.io/shortcode/
Peter
ModeratorHello,
I've tested this case on my demo site but do not see any issues. Please try to deactivate all plugins except Meta Box, MB extension plugins, switch to a standard theme and remove all other field groups then check this again.
Peter
ModeratorHello,
Please go to the My Account page and download a fresh version of MB User Profile 2.4.1 and re-install it on your site then let me know how it goes.
July 25, 2023 at 9:50 PM in reply to: Field values not loading for specific Field group on posts #42747Peter
ModeratorHello,
Can you please share a screenshot of the description field in the Blog Meta Box field group? The option "Save field value" needs to be enabled to display the field value.
Peter
ModeratorIf you are not an administrator user, you need to have the right capabilities to access the CPT of Meta Box to create field groups, post types, taxonomies, views ...
See this screenshot https://imgur.com/eMDtzdvJuly 25, 2023 at 9:33 PM in reply to: ✅Create a "settings" page that will list posts with a custom field that is true #42744Peter
ModeratorHello,
Yes, it is possible. You can create a custom query to list all posts based on the meta value and show them on the settings page. Read more about the custom query in this topic https://wordpress.stackexchange.com/questions/144078/get-posts-by-meta-value
Peter
ModeratorYou can go to Users > User Role Editor > Assign capabilities to the custom role. For example: manage_options, all capabilities in the Core section. For further information, please read more here
https://wordpress.org/documentation/article/roles-and-capabilities/Peter
ModeratorHello hdateam90,
Please check the map field value in the database if it has the format
lat,long,zoom. Refer to this topic https://support.metabox.io/topic/bricks-metabox-and-wpgridbuilder-locator-site/Peter
ModeratorHello,
Do you mean to add a field to an existing field group? If yes, please try to increase the PHP setting
max_input_varsand see if it helps. Read more about the PHP setting in the documentation https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/Peter
ModeratorHello,
You can use a third-party plugin like User Role Editor to add capabilities to the developer role to access Meta Box pages (post types).
https://wordpress.org/plugins/user-role-editor/Peter
ModeratorHello,
If you want to output the selected choices, please follow the documentation https://docs.metabox.io/fields/select/#template-usage
If you want to output all supported choices, please use the function
rwmb_get_field_settings(). Refer to the documentation https://docs.metabox.io/functions/rwmb-get-field-settings/ -
AuthorPosts