Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
Can you please check the value in the database if the field saved the correct value? If not, please share the PHP code that registers the user meta field, I will try to reproduce the issue on my demo site.
Peter
ModeratorHello there,
There is an error when using the single quote in your code, it should be
echo do_shortcode('[mb_frontend_form id="url" post_fields="title,content"]');Peter
ModeratorHello Amy,
To manually review the post before publishing it, you can simply use the attribute
post_statusof the frontend form shortcode[mb_frontend_form id="field-group-id" post_fields="title,content" post_status="pending"].If you want to do something after saving the post, please try to use the hook
rwmb_frontend_after_save_postorrwmb_frontend_after_processPeter
ModeratorHello there,
If you set the field
image_advancedas a cloneable field, you will need to use 2 for loop to get the image ids. Here is an example:$advanced_images = rwmb_meta( 'image_advanced_wyyzp67zec' ); $image_ids = []; foreach ( $advanced_images as $advanced_image ) { foreach ( $advanced_image as $key => $image ) { array_push( $image_ids, $key ); } } $shortcode = '[' . 'gallery ids="' . implode( ',', $image_ids ) . '" itemtag="div" icontag ="div" size="thumbnail" link="file"]';Peter
ModeratorHello Yasmine,
Can you please let me know the full scenario in this case? If you use this code
$term_id = get_queried_object_id(); $value = rwmb_meta( $my_custom_field_id, ['object_type' => 'term'], $term_id );It will work on the archive term page and get the term meta. But you also refer to this code
$was_interview = get_post_meta( $post->ID, 'summary-made', true );which only works on the post page or in the WP Query loop.
Peter
ModeratorHello there,
Currently, MB Block does not support passing data to a function to render the custom block like that. I will inform the development team to explore the possibility.
-
AuthorPosts