Metabox group does not appear

Support MB Group Metabox group does not appear

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8799
    PhaidonasPhaidonas
    Participant

    Hello, i have create a metabox group for a CPT, it appears inside the post, but i can not get appear infront. What ever i tried

    Thanks alot

    Here is the code:

    https://pastebin.com/GV5vZQ0A

    Here is the output at content.php

    <?php
    
    			$group_press_values = rwmb_meta( 'press_group' );
    			if ( ! empty( $group_press_values ) ) {
    			    foreach ( $group_press_values as $group_press_value ) {
    
    			        $value =$group_press_value['wysiwyg_3'];
    			        echo do_shortcode( wpautop( 'wysiwyg_3' ) );
    			    }
    			}
    
    		?>
    #8800
    jacekjacek
    Participant

    Have same problem, vie metabox bulider. Group have no option to select it as cloneable or sortable?

    #8807
    Anh TranAnh Tran
    Keymaster

    Hi Phaidonas,

    Your code looks incorrect. You use press_group as a group ID, but in your code it's the meta box ID. Besides, it's cloneable. I've fixed it here: https://pastebin.com/0xBn7vC2. Please take a look.


    @jacek
    : we are aware of that bug and fixing it. We'll update the new version soon this week.

    #8808
    PhaidonasPhaidonas
    Participant

    I fixed it, but with this call:

    <?php
    
    			$group_press_values = rwmb_meta( 'press_group');
    			if ( ! empty( $group_press_values ) ) {
    			    foreach ( $group_press_values as $group_press_value ) {
    
    						echo $group_press_value['wysiwyg_3'];
    			    }
    			}else{
    				echo 'empty';
    			};
    
    		?>

    It only calls the first character of the text, i also removed the clone option from the press_group

    #8823
    Anh TranAnh Tran
    Keymaster

    If you remove the clone option from press_group, then you should not do a foreach loop. Please try this:

    $group_press = rwmb_meta( 'press_group');
    if ( ! empty( $group_press['wysiwyg_3' ) ) {
        echo $group_press['wysiwyg_3'];
    }
    #8886
    PhaidonasPhaidonas
    Participant

    hello, it works, thanks a lot

    #8888
    jacekjacek
    Participant

    @Ahh Tran Sure thanks for info.

    I managed to do it by adding manualy sort => true and sort_clone => true in custom attributes.

    #8890
    Anh TranAnh Tran
    Keymaster

    @jacek: the latest version of MB Builder already supports that. You don't need to do that manual anymore. Please update.

    #8891
    jacekjacek
    Participant

    Cool, thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Metabox group does not appear’ is closed to new replies.