Custom Fields
Re-Envisioned
Support Meta Box Group Metabox group does not appear

  • Creator
    Topic
  • #8799
    Phaidonas
    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' ) );
    			    }
    			}
    
    		?>
Viewing 8 replies - 1 through 8 (of 8 total)
  • Author
    Replies
  • #8800
    jacek
    Participant

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

    #8807
    Anh 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
    Phaidonas
    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 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
    Phaidonas
    Participant

    hello, it works, thanks a lot

    #8888
    jacek
    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 Tran
    Keymaster

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

    #8891
    jacek
    Participant

    Cool, thanks

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