Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
You can get the PHP code and then put it to the file functions.php in the theme/child theme folder to control the $args manually. Refer to this documentation https://docs.metabox.io/extensions/mb-custom-post-type/#getting-php-code
Long Nguyen
ModeratorHi David,
Can you please share the code that creates the custom fields and settings page on your site? If you are using the Builder, please follow this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Long Nguyen
ModeratorHi Simon,
Please create a request here https://metabox.io/contact/. Our development team will help you to upgrade the license.
May 11, 2022 at 10:19 PM in reply to: How to make different custom meta for different custom taxonomies? #35987Long Nguyen
ModeratorHi,
Here is an example:
add_filter( 'rwmb_meta_boxes', 'prefix_register_taxonomy_meta_boxes' ); function prefix_register_taxonomy_meta_boxes( $meta_boxes ){ $meta_boxes[] = [ 'title' => 'Category Fields', 'taxonomies' => 'category', // THIS: List of taxonomies. Array or string 'fields' => [ ... ], ]; $meta_boxes[] = [ 'title' => 'Tag Fields', 'taxonomies' => 'post_tag', // THIS: List of taxonomies. Array or string 'fields' => [ ... ], ]; return $meta_boxes; }Long Nguyen
ModeratorHi Chris,
You will have an array of items when retrieving the clone field value. And follow this topic to know how to count items with Twig https://stackoverflow.com/questions/17665271/counting-the-number-of-elements-in-array
May 11, 2022 at 12:38 PM in reply to: How to make different custom meta for different custom taxonomies? #35978Long Nguyen
ModeratorHi,
Sorry, I do not understand the question clearly. Do you mean to create different custom fields for other terms of a taxonomy? Like this topic https://support.metabox.io/topic/adding-field-group-for-woocommerce-category/
In the documentation, you can use the same custom fields for all terms of other taxonomies.
May 10, 2022 at 10:26 PM in reply to: How To Get Custom Fields To Show Up In New GenerateBlocks Dynamic Functionality #35974Long Nguyen
ModeratorHi,
Does the MB Rest API add-on automatically set show-in-rest to true for custom fields when the box is checked in advanced settings for a post type?
It automatically functions. That means after activating MB Rest API, all custom fields value will be added under the field
meta_box. Read more on the documentation https://docs.metabox.io/extensions/mb-rest-api/Long Nguyen
ModeratorHi,
Currently, the field
postis also optimized for the query post. That means there are 10 posts (default, you've set it to 5) that will be queried to display per keyword.The same query is also cached on the database, see this code https://github.com/wpmetabox/meta-box/blob/master/inc/fields/post.php#L170
So I don't think it is a performance issue with the field itself. You can try to optimize your database or use an object cache plugin such as Memcached, or Redis or limit searching posts with the setting
query_argsto speed up the search time.Long Nguyen
ModeratorHi Dennis,
If you want to display the pagination with MB Views, please refer to these topics https://support.metabox.io/topic/pagination-on-views/#post-29728
https://support.metabox.io/topic/show-pagination-for-query/Long Nguyen
ModeratorHi,
Please refer to this topic to create a honeypot field https://support.metabox.io/topic/honeypot-field/
Long Nguyen
ModeratorHi Aaron,
We got this issue. It will be fixed in the next update.
Thanks for your patience.May 9, 2022 at 12:39 PM in reply to: MB View shortcode including the CPT to pull the field contents from #35962Long Nguyen
ModeratorHi Robert,
If you want to use the View shortcode to render field values of a specific post, you can pass custom data (post ID) to the shortcode. For example:
View shortcode:
[mbv name="cta-rugpijn" my_post_id="2501"]View content:
My Post Meta: {% set field_value_1 = mb.rwmb_meta( 'field_id_1', '', my_post_id ) %} {% set field_value_2 = mb.rwmb_meta( 'field_id_2', '', my_post_id ) %} {{ field_value_1 }} - {{ field_value_2 }}Read more on the documentation https://docs.metabox.io/extensions/mb-views/#custom-data
May 9, 2022 at 12:32 PM in reply to: How To Get Custom Fields To Show Up In New GenerateBlocks Dynamic Functionality #35961Long Nguyen
ModeratorHi Brent,
GenerateBlocks is not fully compatible with Meta Box yet. But if GenerateBlocks can work with the standard custom fields, it should work with the custom fields created by Meta Box. For example some simple fields like text, email, number, single_image ...
You can contact GenerateBlocks support to ask for help with this case.
May 8, 2022 at 9:18 PM in reply to: ✅Adding a Post Thumbnail using Metabox Field on the Front End #35955Long Nguyen
ModeratorHi Warren,
You can use the WordPress function
set_post_thumbnail()to set the featured image for the post. For example:function update_post_thumbnail( $post_id ) { // Get the field value $my_meta = rwmb_meta( 'single_image', '', $post_id ); set_post_thumbnail( $post_id, $my_meta ); }Read more on the documentation https://developer.wordpress.org/reference/functions/set_post_thumbnail/
Long Nguyen
ModeratorHi Aaron,
Can you please let me know which Meta Box version on your site is?
-
AuthorPosts