Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
You can check the fan_profile is not empty before setting the args. For example:
{% if post.fan_profile is not empty %} {% set spending_args = { post_type: 'fanspending', name: post.fan_profile, numberposts: 1 } %} ... {% endif %}December 1, 2023 at 10:14 PM in reply to: ✅datepicker not being translated when using mb_frontend_form #43981Peter
ModeratorHello,
Thanks for your feedback. I don't see it working in both cases. I've escalated this issue to the development team to fix it.
Peter
ModeratorHello,
Thanks for your feedback. I will inform the development team to consider supporting this case in future updates.
December 1, 2023 at 8:59 PM in reply to: Autocomplete field - show all values from predefined list when click #43978Peter
ModeratorHello,
I'm afraid that there isn't an option to show all values when clicking on the autocomplete field, it's not how it works. I think you can use the select field to show all values from the list.
Peter
ModeratorHello Lee,
Please share the register form shortcode that you use on your site. I tested this again on my demo site and see it still works as well. Following the documentation https://docs.metabox.io/extensions/mb-user-profile/#registration-form
[mb_user_profile_register role='editor']Peter
ModeratorHello,
I see the issue. You have two group fields with the same ID on a page, so the value of the last group will be saved and the value will display in all group fields after saving. It is expected behavior.
On the same page, each field needs to have a unique ID. It is noted in the documentation
https://docs.metabox.io/field-settings/Field ID. Required and must be unique. It will be used as meta_key when saving to the database. Use only numbers, letters, and underscores (and rarely dashes).Peter
ModeratorHello,
Using the double curly brackets to output the value, don't use them when you use a variable.
{% set spending_args = { post_type: 'fanspending', name: post.fan_profile, numberposts: 1 } %}Peter
ModeratorHello,
Yes, I add a group field "addresses" with the same ID in two field groups (meta box). Please export your field groups to JSON files and share them here. I will import them to my site and check this issue.
Here are field groups on my site.
https://drive.google.com/file/d/1mDJORfNw9bJLcP6N2aBroji3UdHP_ioO/view?usp=sharing
https://drive.google.com/file/d/10pZmv9m5_kv1tHC06doQkVDLe67nTTTA/view?usp=sharingPeter
ModeratorHello Cedric,
You should select the Meta Box Field under the Site section and select the field on a settings page. Screenshot https://imgur.com/kqtat8j
November 28, 2023 at 10:49 PM in reply to: Get Group cloneable Subfield Value via Shortcode or Post Meta #43958Peter
ModeratorHello Jason,
To get the subfield value in a group field, you need to use the code. Currently, we do not support using shortcode to output the subfield value. Please follow the documentation
https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-valuesPeter
ModeratorHello,
I test this case again on my demo site and see the helper function
rwmb_meta()still returns the serialized value correctly. By default, the object type ispost. If you use the user meta, please pass the object typeuserto the argument:$args = [ 'storage_type' => 'custom_table', 'table' => 'company', 'object_type' => 'user' ];The API function works because it uses the SQL query and query directly in the database while using the helper function
rwmb_meta()there are some data types added to this. Please follow the documentation
https://docs.metabox.io/extensions/mb-user-meta/#getting-field-valuePeter
ModeratorHello,
I've escalated this issue to the development team to fix this in future updates. Thank you.
November 27, 2023 at 10:37 PM in reply to: Rewrite permalink of CPT taxonomy to equal of archive page #43945Peter
ModeratorHello Tobias,
It is different from my description. You are using
Custom rewrite slug, notCustom archive slugfor the CPT. I also don't understand why you add theteamtoCustom rewrite slugoption while the CPT slug isteam.
If you addinformationfor CPTCustom archive slugandCustom rewrite slugfor custom taxonomy, it works properly.Also, Meta Box Custom Post Types and Taxonomies just helps you to register the CPT and taxonomies with UI. It passes the arguments to the WordPress function register_post_type() and register_taxonomy(). So if you see an issue with CPT and taxonomies, it actually is a WordPress issue.
November 27, 2023 at 8:46 PM in reply to: ✅The relationship in View thru Shortcode doesn't get shown #43944Peter
ModeratorHello,
You can use the sample code below to get relationship posts in a loop:
{% for post in posts %} {# get the country post #} {% set country_args = { post_type: 'countrydetails', relationship: { id: 'fan-countrydetails', to: post.ID } } %} {% set country_posts = mb.get_posts( country_args ) %} {% for country_post in country_posts %} {# output the country post and other info #} {{ country_post.post_title }} {% endfor %} {% endfor %}Peter
ModeratorHello Eddy,
It's not an issue of Meta Box itself so please contact User Role Editor support to get further assistance. Please read more about support policy https://docs.metabox.io/support-policy/
Thank you.
-
AuthorPosts