Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
The plugin Loco Translate can scan translatable strings of all extensions under Meta Box AIO as well. Screenshot https://imgur.elightup.com/kl9gm7r.png
Long Nguyen
ModeratorHi,
You can check if the field
project_documentsis empty if you add the value to the fielddocument_iconbefore. If two fields are empty, the clone group will not be saved and just needn't check value exist.{% for clone in post.upload_documents %} {% if( clone.project_documents is empty ) %} Empty!!! {% endif %} {% for item in clone.project_documents %} {{ item.url }} <br> {% endfor %} {% endfor %}Long Nguyen
ModeratorHi,
Can you please clear all caches and re-check this issue? If not, please share some screenshots on your end about two pages with shortcodes.
Long Nguyen
ModeratorHi,
You can try to use the WordPress function get_queried_object_id() to get the current post ID.
$primary_color_1 = rwmb_meta( 'primary_hero_bg_color_1', '', get_queried_object_id() );Long Nguyen
ModeratorHi,
You can try to get the current field value and assign it to the
stdsetting if the value is already set. Refer to this tutorial https://docs.metabox.io/save-wysiwyg-content-post-content/Long Nguyen
ModeratorHi,
The code displays images from a cloneable group field on the single post as well. So you need to contact Oxygen support to ask for adding the code to the repeater module on each post.
Long Nguyen
ModeratorHi,
The
searchableoption only supports searching posts, not users or terms. I'm going to inform the developer team to consider supporting this option for users and terms.Please read more here https://docs.metabox.io/extensions/mb-admin-columns/#3-advanced-configuration
Long Nguyen
ModeratorHi,
I think you can use the translation language plugin to translate the plugin's strings. Meta Box and extensions support getting text to translate as well (using internationalization function)
Long Nguyen
ModeratorHi,
If a clone of a group or a field is not added value, it will not save any data to the database so you needn't check the value of the file uploaded existed. Just show them
{% for clone in post.upload_documents %} {% for item in clone.project_documents %} {{ item.url }} <br> {% endfor %} {% endfor %}Long Nguyen
ModeratorHi,
Please update the new version of MB Frontend Submission 3.1.5 or MB AIO 1.15.2 to use the frontend dashboard shortcode in the Oxygen builder.
Long Nguyen
ModeratorHi Kirb,
I see you have two
forloops that getproject_documents, you can try to remove one and re-check the result. On another hand, you can share the code that creates your custom fields, I will help you to correct the loop.Long Nguyen
ModeratorHi,
You can try to increase the PHP configuration on your server/hosting to avoid browser crashes because out of memory issue. Refer to this documentation
https://make.wordpress.org/hosting/handbook/performance/#configurationLong Nguyen
ModeratorHi,
You can create a custom block category, move it to the top and assign the block to that category. Refer to this documentation https://developer.wordpress.org/reference/hooks/block_categories_all/
https://stackoverflow.com/questions/54185278/how-to-list-and-re-arrange-or-manipulate-gutenberg-block-categories-in-wordpressfunction wpdocs_add_new_block_category( $block_categories, $block_editor_context ) { $custom_category = [ 'slug' => 'my-block-category', 'title' => esc_html__( 'My Block Category', 'text-domain' ), 'icon' => 'wordpress', // Slug of a WordPress Dashicon or custom SVG ]; $block_categories[0] = $custom_category; return $block_categories; } add_filter( 'block_categories_all', 'wpdocs_add_new_block_category', 10, 2 );Long Nguyen
ModeratorHi Daniel,
The field custom_html does not save the value to the database, it is not supported to display/render on the frontend so it will not work with the block. You can create a custom function such as
function show_my_template( $post_id ) { echo 'Post ID is: ' . $post_id; }Then add the custom function to the render callback function and pass the accepted arguments to the custom function
https://docs.metabox.io/extensions/mb-blocks/#render_callbackfunction my_hero_callback( $attributes, $is_preview = false, $post_id = null ) { // Fields data. if ( empty( $attributes['data'] ) ) { return; } show_my_template( $post_id ); ... }October 26, 2021 at 9:28 AM in reply to: Image Custom Fields not Working on Kadence Dynamic Content #31510Long Nguyen
ModeratorHi,
The field
imagesaves the image IDs in the database, it is different from thetextortextareafield so Kadence might not work with this data type.You can follow the documentation to know how to output the image with the helper function
https://docs.metabox.io/fields/image/#template-usageOr use the field
single_imageand output the image by using the helper shortcode
https://docs.metabox.io/shortcode/ -
AuthorPosts