Support Forum » User Profile

Forum Replies Created

Viewing 6 posts - 3,781 through 3,786 (of 3,786 total)
  • Author
    Posts
  • in reply to: User met not saving #38938
    PeterPeter
    Moderator

    Hello,

    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.

    in reply to: Insert custom post type shortcode into header #38937
    PeterPeter
    Moderator

    Hello 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"]');
    
    in reply to: Holding fields for review #38934
    PeterPeter
    Moderator

    Hello Amy,

    To manually review the post before publishing it, you can simply use the attribute post_status of 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_post or rwmb_frontend_after_process

    in reply to: Image Advanced not getting IDs from cloneable field #38933
    PeterPeter
    Moderator

    Hello there,

    If you set the field image_advanced as 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"]';
    
    in reply to: Getting object ID #38932
    PeterPeter
    Moderator

    Hello 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.

    in reply to: Output mb block from code with static data #38931
    PeterPeter
    Moderator

    Hello 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.

Viewing 6 posts - 3,781 through 3,786 (of 3,786 total)