Forum Replies Created
-
AuthorPosts
-
November 28, 2023 at 10:49 PM in reply to: Get Group cloneable Subfield Value via Shortcode or Post Meta #43958
Peter
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.
Peter
ModeratorHello,
I understand you want to render the shortcode in the WYSIWYG field value. And it is already noted in the documentation
https://docs.metabox.io/fields/wysiwyg/#template-usage
Note that the helper function doesn't format the value of this field nor run shortcodes in the content. In case you want to make it behaves similar to the post content (e.g. format and shortcodes), use this code:global $wp_embed; $value = rwmb_meta( 'wysiwyg_field_id' ); $value = do_shortcode( wpautop( $wp_embed->autoembed( $value ) ) ); echo $value;https://docs.metabox.io/shortcode/
[rwmb_meta id="wysiwyg_field_id"]render_shortcodeWhether to render inner shortcodes inside the value of the field. For example, if you enter a shortcode in a textarea/editor field, this attribute will render that shortcode and return the rendered content. Default true.Have you applied those on your site and see how it goes?
Peter
ModeratorHello,
However when I do that I run into issues with trying to call the API functions (rwmb_meta) even when passing in the table args params.What exactly are the issues? And let me know the code that you use to call the API function.
Peter
ModeratorHello,
I don't have any idea. Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.Peter
ModeratorHello,
If you want to run the shortcode in the WYSIWYG field value, please follow the documentation
https://docs.metabox.io/fields/wysiwyg/#template-usageOr use the helper shortcode https://docs.metabox.io/shortcode/
Peter
ModeratorHello,
Thanks for sharing the information.
Following the WordPress documentation, the attachment post (media) could be considered a child of a post so you can use the post_status
inheritoranyto get the attachment posts.
https://developer.wordpress.org/reference/functions/get_children/
https://wordpress.org/documentation/article/post-status/I will inform the development team to update the doc for this case.
November 26, 2023 at 9:08 AM in reply to: Rewrite permalink of CPT taxonomy to equal of archive page #43929Peter
ModeratorHello Dani,
For the taxonomy: You can edit the custom taxonomy > Advanced tab > Custom rewrite slug > Add the rewrite slug "information" > Save changes.
For the CPT: You can edit the CPT > Advanced tab:
- Enable option: Has archive
- Custom archive slug: information
- Save changes.and re-save permalink settings. It works correctly on my demo site.
Peter
ModeratorHello,
Thanks for your feedback.
After adding the sample code to create the custom model as in the documentation https://docs.metabox.io/extensions/mb-custom-table/#custom-models
I only see the error one time and everything works as well. However, I will report this issue to the development team to fix it in future updates.November 24, 2023 at 9:09 PM in reply to: ✅Fontend submission : classic type content -- convert to blocks? #43910Peter
ModeratorHello,
I will inform the development team to consider supporting this case in future updates.
Thank you.
November 24, 2023 at 8:59 PM in reply to: Connecting multiple CPTs for a single post type template #43909Peter
ModeratorHello Stefan,
I think you are trying to create a travel theme which will need a lot of custom code to do. With Elementor Pro or Bricks, it isn't possible with only drag and drop. With View, which is a code editor, not a builder, it isn't enough to use only View to do that, you still need to use PHP code.
You can refer to this series https://metabox.io/build-hotel-booking-web-use-meta-box-p1/
if you are not able to complete the task, please contact us here https://metabox.io/contact/
we offer a customization service with an extra fee. -
AuthorPosts