Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorLet me know if you have any questions ๐
Long Nguyen
ModeratorHi,
The setting "Max number of files" only limits the user to upload one file, the data still returns an array of images.
You can use the function
reset()to get the first-one array element.$images = rwmb_meta( 'settings_logo', ['object_type' => 'setting'], 'my_options' ); $image = reset( $images ); ?> <img src="<?php echo $image['url']; ?>">See more on this docs https://docs.metabox.io/fields/image/#template-usage.
Long Nguyen
ModeratorHi Sridhar,
Thank you for reaching out.
There are some problems with your code when registering the settings page, meta box, and output the field
imagevalue, please follow these steps:- the settings page should have an ID
$settings_pages[] = [ 'menu_title' => __( 'Options', 'project-name' ), 'option_name' => 'my_options', 'id' => 'my-options', 'position' => 25, 'columns' => 1, 'icon_url' => 'dashicons-admin-generic', ];- when registering the meta box, the key
settings_pagehas to assign to option name
$meta_boxes[] = [ 'title' => __( 'Sitewide', 'project-name' ), 'id' => 'sitewide', 'settings_pages' => 'my_options', 'fields' => [ ... ], ];- the field
logohas the prefix concatenated so the right ID of it issettings_logo - the field
imageis set to multiple, so you should use the loop to iterate through the array of images to get the image information. Get more details here https://docs.metabox.io/fields/image/#template-usage
the code should be:
$images = rwmb_meta( 'settings_logo', ['object_type' => 'setting'], 'my_options' ); foreach ( $images as $image ) { echo '<a href="', $image['full_url'], '"><img src="', $image['url'], '"></a>'; }Long Nguyen
ModeratorHi,
The
fieldskey is an array of field arrays, it should be$meta_boxes[] = array( 'title' => 'File', 'post_types' => 'post', 'fields' => array( array( 'id' => 'file', 'name' => 'File Advanced', 'type' => 'file_advanced', // Delete file from Media Library when remove it from post meta? // Note: it might affect other posts if you use same file for multiple posts 'force_delete' => false, // Maximum file uploads. 'max_file_uploads' => 2, // File types. // 'mime_type' => 'application,audio,video', // Do not show how many files uploaded/remaining. 'max_status' => 'false', 'multiple' => false ), array( // another field ), ), );Get more details on this basic documentation https://docs.metabox.io/creating-meta-boxes/.
Long Nguyen
ModeratorHi,
Thank you for reaching out.
Yes, it is one of the main features of the extension MB Frontend Submission. If you create the fields via the Builder, just copy the shortcode and add it to the page to show the form. Screenshot https://share.getcloudapp.com/2NuwKJwN.
Get more details on this documentation https://docs.metabox.io/extensions/mb-frontend-submission/.
Long Nguyen
ModeratorHi,
Please share the information via this contact form https://metabox.io/contact/, I will help you to check it.
Long Nguyen
ModeratorHi,
The meta box and custom fields display as well on your post type Event, screenshot https://share.getcloudapp.com/WnuY4eJK.
It displays on the side, you can change the position of meta boxes in the tab Settings > Position, screenshot https://share.getcloudapp.com/ApuY1Qk7.
Long Nguyen
ModeratorHi,
I've not checked the compatibility of Meta Box and Map Facet before but you can contact the plugin support to use the latitude and longitude like this topic https://support.metabox.io/topic/how-to-remove-zoom-level-from-location-output/.
Long Nguyen
ModeratorHi,
Thank you for reaching out.
Please follow this topic to know how to update a field value via jQuery code https://support.metabox.io/topic/calculation-in-fields-success-error-messages-jquery-version/.
Long Nguyen
ModeratorHi,
Thank you for reaching out.
By default, the output of the map fields (Google Map or OSM) always includes the latitude, longitude, and zoom. If you want only to use the latitude and longitude, please follow this documentation https://docs.metabox.io/fields/map/#getting-field-value.
March 27, 2021 at 10:15 PM in reply to: โ Simple HTML code on RADIO/CHECKLIST labels is not working anymore #26750Long Nguyen
ModeratorThanks for confirming. It will be included in the next release.
Long Nguyen
ModeratorHi,
Thank you for reaching out.
To get started, please follow this documentation https://docs.metabox.io/displaying-fields/.
If the post type and custom fields do not show on your admin dashboard, please share your site credentials via this contact form https://metabox.io/contact/. I will help you to check the issue.
Long Nguyen
ModeratorHi,
Please export the field groups (JSON file) then share them here. I will try to import it to my local site to check the issue.
March 27, 2021 at 9:39 PM in reply to: โ Simple HTML code on RADIO/CHECKLIST labels is not working anymore #26746Long Nguyen
ModeratorHi,
The development team has pushed a commit to fix this issue. Can you please get the new code and re-check the issue?
Long Nguyen
ModeratorHi,
If it's a free plugin on WordPress.org, please share the URL here. Or if it's a premium plugin, please share a copy of it via this contact form https://metabox.io/contact/, I will send it to the development team to check it with a low priority.
-
AuthorPosts