Forum Replies Created
-
AuthorPosts
-
August 27, 2022 at 1:12 PM in reply to: ✅Custom Table Values - Not Saving To The Custom Tables #38083
Long Nguyen
ModeratorHi,
I'm not able to reproduce that issue on my site. Can you please create a new field group (meta box) and recheck this issue?
Long Nguyen
ModeratorHi,
You can enable WP Debug to get the error log and share it here https://wordpress.org/support/article/debugging-in-wordpress/
It will help us to know what's wrong with your site.
Long Nguyen
ModeratorHi,
In the Render Code area, you can use the field ID only to display the field value or use the helper function without passing two parameters.
{% set review_summary = mb.mb_get_block_field( 'review_button_text' ) %} {{ review_summary }}or just
{{ review_button_text }}Long Nguyen
ModeratorHi,
It looks like the WP Grid Builder does not support displaying the related posts that created by MB Relationships. You can contact WP Grid Builder support to ask for help with this case (they create the integration with Meta Box).
Or use the MB Relationships shortcode to add to the builder, please read more on the documentation https://docs.metabox.io/extensions/mb-relationships/#shortcode
August 26, 2022 at 10:25 AM in reply to: ✅Update a CF stored in a custom table, based on another CF #38065Long Nguyen
ModeratorHi,
Can you please share the code that creates the custom fields and custom table on your site? I will check it on my demo site.
You can also try to use the custom table APIs to add/update data, please read more on the documentation https://docs.metabox.io/extensions/mb-custom-table/#api
Long Nguyen
ModeratorHi Jochen,
Please use the helper function
mb_get_block_field()to display the field value in the Block editor.{% set review_summary = mb.mb_get_block_field( 'review_button_text' ) %}Read more on the documentation https://docs.metabox.io/extensions/mb-blocks/#render_callback
Long Nguyen
ModeratorHi,
Please share your site credentials via this contact form https://metabox.io/contact/
I will take a closer look.Long Nguyen
ModeratorHi Nick,
The setting
multipleshould be added under thesupportssetting'supports' => [ 'align' => ['wide', 'full'], 'customClassName' => true, 'anchor' => false, 'multiple' => false ],Read more on the documentation https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#multiple
Long Nguyen
ModeratorHi,
Yes, that kind of shortcode works as well on my demo site. Can you please replace the variable
post.IDwith a real/example post ID and recheck this issue?[bricks_template id="123"]Long Nguyen
ModeratorHi Clinton,
Can you please share the fatal error message on your site?
Long Nguyen
ModeratorHi,
You can follow this code to update the text field in a group https://support.metabox.io/topic/adding-data-to-key-value-field-via-php/#post-37436
August 25, 2022 at 12:47 PM in reply to: TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING #38035Long Nguyen
ModeratorHi,
On the frontend submission form https://radhr.org/submit/
there is an issue with the JS file of the theme Blocksy Child, it is broken and affects the conditional logic of our plugin. I've tried to deactivate all plugins except Meta Box, MB AIO and switch to the standard theme Twenty TwentyTwo then the conditional logic works as well.On the backend, I do not see the long time to appear/disappear the field like that. You can follow the troubleshooting steps above to recheck this issue.
Screen record https://monosnap.com/file/wkugk1Hdm9LBBZraEkqk6q51MHHpZj
Long Nguyen
ModeratorHi,
Yes, it is possible. You can add any shortcode to the View content to render it on the frontend.
August 25, 2022 at 12:31 PM in reply to: ✅How I can display clonable Text/Text List as ul/li HTML? #38033Long Nguyen
ModeratorHi,
I think you should have a basic knowledge of PHP and WordPress coding to understand what is the custom field and how to output the field value on your site.
https://wordpress.org/support/article/custom-fields/
https://docs.metabox.io/custom-fields/1. Custom fields are associated with the post/page, so if the page does not have the custom field, the code will not output the field value.
2. You can create a custom code in View, then set the View type to Shortcode and add this shortcode to the post content to output the field value.
If you want to use the PHP code, please create your own shortcode by following this documentation https://codex.wordpress.org/Shortcode_API3. It is the basic PHP code, you can add the
<ul>tag before/after the loop and add the<li>tag inside the loop.<?php $values = rwmb_meta( 'text_list_ms44n1h3uw' ) ?> <ul> <?php foreach ( $values as $value ) : ?> <li><?= $value ?></li> <?php endforeach ?> </ul>Long Nguyen
ModeratorHi,
To merge an object to an object in View with Twig code you can follow this example code:
{% set my_tax_query = { "relation": "OR" } %} {% set my_tax_query = my_tax_query|merge({ 0: { taxonomy: "category", field: "slug", terms: "aciform" } }) %} {% set my_tax_query = my_tax_query|merge({ 1: { taxonomy: "category", field: "slug", terms: "cat-a" } }) %} {% set args = { post_type: "post", posts_per_page: 5, tax_query: my_tax_query } %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} {{ post.post_title }} {% endfor %}Hope that makes sense.
-
AuthorPosts