Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
If you are using the Builder, you can use the option "Time picker options" to set the time format. Screenshot https://share.getcloudapp.com/RBuy71Rl
Or using the code
'fields' => [ [ 'name' => __( 'Time Picker', 'your-text-domain' ), 'id' => 'time_picker', 'type' => 'time', 'js_options' => [ 'timeFormat' => 'hh:mm TT', ], ], ],Refer to the documentation https://docs.metabox.io/fields/time/
https://trentrichardson.com/examples/timepicker/Long Nguyen
ModeratorHi,
You can follow this documentation to get the subfield value in a group https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-values
and this documentation to create a cronjob in WordPress site https://developer.wordpress.org/reference/functions/wp_schedule_event/
December 30, 2021 at 4:08 PM in reply to: Show add to favorites in Archive posts / Loop posts #32924Long Nguyen
ModeratorHi Marius,
You need to pass the post ID to the attribute
idof the button shortcode to show a favorite button for each post on the archive page. For example:<div class="exposee-details"> <a href="{{ post.url }}" >Details</a> [mbfp-button id="{{ post.ID }}" class="custom_class" icon="heart" show_icon="true"] </div>Please get more details on the documentation https://docs.metabox.io/mb-favorite-posts/#shortcodes
December 30, 2021 at 12:59 PM in reply to: ✅Settings Page tag conflict with thenewsletter plugin #32921Long Nguyen
ModeratorHi,
Yes, you have to use the filter hook
mb_settings_pagesto register a settings page. If the settings page works properly before activating the plugin newsletter, please contact this plugin support to ask for help with this case.Long Nguyen
ModeratorHi,
Please follow this documentation to know how to generate PHP code in the Builder https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
If it is just the cloneable text field, please follow this documentation to output the value
https://docs.metabox.io/fields/text/#template-usageLong Nguyen
ModeratorHi,
If you are using the shortcode, the attribute
object_typeshould be assigned the valuesetting.[rwmb_meta id="alpha-business-name" object_type="setting" object_id="global-settings"]and the field ID looks wrong.
$value = rwmb_meta( 'alpha-business-name', ['object_type' => 'setting'], 'global-settings' ); echo $value;Refer to the documentation
https://docs.metabox.io/extensions/mb-settings-page/#getting-field-value
https://docs.metabox.io/shortcode/#examplesDecember 29, 2021 at 12:49 PM in reply to: ✅Use User Profile Data as Default Data for Other MB Custom Fields #32905Long Nguyen
ModeratorHi,
If you have the field
numberfor the user and it has the IDfav_number, then you can use this code to get the user meta and set it as the default value when registering the fieldnumberfor the post.add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $current_user_id = get_current_user_id(); $default_number = get_user_meta( $current_user_id, 'fav_number', true ); $meta_boxes[] = [ 'title' => __( 'Post Meta', 'your-text-domain' ), 'id' => 'post-meta', 'fields' => [ [ 'name' => __( 'Number', 'your-text-domain' ), 'id' => 'number', 'type' => 'number', 'std' => $default_number ], ], ]; return $meta_boxes; }Refer to the documentation
https://developer.wordpress.org/reference/functions/get_user_meta/
https://docs.metabox.io/field-settings/#default-valueLong Nguyen
ModeratorHi,
As you can read on the documentation https://docs.metabox.io/extensions/mb-views/#custom-query
the function
get_posts()orget_post()returns the post object and it does not include the permalink or URL of the post. So we can use WP functionget_the_permalink()to get post permalink based on the post ID.Long Nguyen
ModeratorHi,
You can use the setting
query_argsto pass the arguments to the post query to order posts by alphabetical. For example:'fields' => [ [ 'name' => __( 'Post', 'your-text-domain' ), 'id' => $prefix . 'post_kyojjvjwxa', 'type' => 'post', 'post_type' => ['post'], 'field_type' => 'checkbox_list', 'query_args' => [ 'order' => 'ASC', ], ], ],Please get more details on the documentation
https://docs.metabox.io/fields/post/#sample-code
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parametersLong Nguyen
ModeratorHi,
Please refer to this topic to use the field
taxonomy_advanced
https://support.metabox.io/topic/not-show-taxonomy-field-values-in-mb-blocks/Long Nguyen
ModeratorHi,
Can you please share the code that creates the field on your site?
Long Nguyen
ModeratorHi Tom,
FYI, the MB Views plugin uses the Twig version 3.2.1 and runs Twig functions/classes under the namespace
MBViews. You can contact Content Importer support to ask for help with this case.Long Nguyen
ModeratorHi,
It looks like you create a new term when submitting a post on the front end but I do not see that issue on my site. Can you please deactivate all plugins except Meta Box, MB extensions and switch to the standard theme of WordPress then re-check this issue?
Long Nguyen
ModeratorHi Stephen,
Currently, we do not support an option or a filter hook to modify the form HTML. You can use the JavaScript code to add more attributes to the form.
Long Nguyen
ModeratorHi,
You are using the
custom query, please use the WordPress function get_the_permalink() to get the permalink. For example:<a href="{{ mb.get_the_permalink( post.ID ) }}">{{ post.post_title }}</a>Refer to this documentation https://docs.metabox.io/extensions/mb-views/#custom-query
-
AuthorPosts