Support Forum Β» User Profile

Forum Replies Created

Viewing 15 posts - 2,401 through 2,415 (of 3,707 total)
  • Author
    Posts
  • Anh TranAnh Tran
    Keymaster

    Hi, I tried that and couldn't replicate the bug. Here is what I have:

    https://imgur.com/a/CYP77

    Can you try again?

    in reply to: Show/Hide an option in select field #8422
    Anh TranAnh Tran
    Keymaster

    Hi, currently it's not possible. You can show/hide the whole field only πŸ™

    in reply to: Category output not working properly #8421
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the problem comes from how you get the custom field data for categories. Basically, this loop:

    foreach ( $cats as $cat ) {
    	$term_id = $cat->term_id;
    }

    makes $term_id is always the ID of the last category. No matter how many categories, it always get the last category.

    That's why you always see the same data. Please take a look at that.

    Anh TranAnh Tran
    Keymaster

    Oops, I've just fixed it in version 1.0.1. Please update.

    Anh TranAnh Tran
    Keymaster

    Hi again, this bug is fixed.

    in reply to: βœ…MB Relationships - Using each_connected multiple times #8410
    Anh TranAnh Tran
    Keymaster

    No problem. Here is the code for registering relationships:

    add_action( 'mb_relationships_init', function () {
    	MB_Relationships_API::register( array(
    		'id'   => 'posts_to_pages',
    		'from' => 'post',
    		'to'   => 'page',
    	) );
    	MB_Relationships_API::register( array(
    		'id'   => 'posts_to_posts',
    		'from' => 'post',
    		'to'   => 'post',
    	) );
    } );

    And here is the code to fetch connections (in index.php file):

    global $wp_query;
    MB_Relationships_API::each_connected( array(
    	'id'       => 'posts_to_pages',
    	'from'     => $wp_query->posts,
    	'property' => 'connected_pages',
    ) );
    
    MB_Relationships_API::each_connected( array(
    	'id'       => 'posts_to_posts',
    	'to'       => $wp_query->posts,
    	'property' => 'connected_posts',
    ) );

    Here is the code in the content.php file:

    foreach ( $post->connected_pages as $post ) : setup_postdata( $post );
    	the_title();
    endforeach;
    wp_reset_postdata();
    
    echo '<hr>';
    
    foreach ( $post->connected_posts as $post ) : setup_postdata( $post );
    	the_title();
    endforeach;
    wp_reset_postdata();
    in reply to: βœ…How to hide group field when post field is empty? #8409
    Anh TranAnh Tran
    Keymaster

    Hi, the problem is your post field ID. On the editing screen, the #post is used for the post form, so you can't use ID post. You need to change the ID of the post field.

    Then, you can hide the group if the field is null with this condition:

    'hidden' => array( 'post2', '=', '' ), // post2 is post field ID.

    PS: Please renew your license to get updates of extensions and support.

    in reply to: Ask about "image_advanced" field. #8385
    Anh TranAnh Tran
    Keymaster

    We’ve just realized this problem and we’re working this.

    PS: It's fixed in the version 1.2.2. Please update.

    in reply to: βœ…How to add a custom id to the "rwmb-meta-box" wrapper #8383
    Anh TranAnh Tran
    Keymaster

    Hi UG,

    1. If that's the case, then you can use the id automatically created by WordPress. Each meta box will have a unique ID the same as the ID settings. See this screenshot:

    https://imgur.elightup.com/yP1KjMq.png

    2. I've seen the issues with the code. No need screenshot anymore. I will check and fix it asap.

    3. I've checked and seen the fields appear before .edit-tag-actions. Here is how it appears on my side:

    https://imgur.elightup.com/M7XcDOv.png

    PS: To upload the screenshot, you can use this app: https://getsharex.com/. It auto uploads images to imgur.com after taking screenshots. Then just paste the image URL here.

    in reply to: Ask about "image_advanced" field. #8381
    Anh TranAnh Tran
    Keymaster

    Yes, you can. Just set a setting 'max_file_uploads' => 1 for the field (see docs).

    Or better use the single_image field. It's created for this exact purpose. See docs.

    in reply to: image_upload field and MB Settings Page #8380
    Anh TranAnh Tran
    Keymaster

    Hi, your code seems to correct. When specify limit it returns an array of single image. So you might want to do this:

    $images = rwmb_meta( 'field_id', array(
        'object_type' => 'setting',
        'size'        => 'thumbnail',
        'limit'       => 1,
    ), 'options_name' );
    $image = reset( $images );
    echo $image['url'];
    in reply to: βœ…Custom forum posts #8379
    Anh TranAnh Tran
    Keymaster

    Please send me via email. Thanks.

    in reply to: MB Relationships - Admin edit panels #8378
    Anh TranAnh Tran
    Keymaster

    Hi, this is a good idea. I planned to worked with admin columns. I will make a not on that.

    in reply to: βœ…MB Relationships - Using each_connected multiple times #8375
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've just tested again with a similar code and here is my result:

    https://imgur.com/a/3FpVk

    Can you check your code again please?

    in reply to: βœ…Not compatible with MB Builder? #8373
    Anh TranAnh Tran
    Keymaster

    Hi,

    The MB Builder hasn't supported the MB Term Meta yet. But you can get over it with "Custom Attributes" for meta box. Switch to "Settings" tab and set a custom attribute "taxonomies" and enter your taxonomy slug into the input, like in this screenshot:

    https://imgur.elightup.com/ZwsLeKM.png

    We'll update the plugin to make it easier for selecting taxonomies in the next version.

Viewing 15 posts - 2,401 through 2,415 (of 3,707 total)