MB Group not display in post type

Support MB Group MB Group not display in post type

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2699
    fauzifauzi
    Participant

    MB Group not display in post type

    #2705
    Anh TranAnh Tran
    Keymaster

    Hi, can you post your code?

    #2706
    chapkovskichapkovski
    Participant

    The same thing with my Meta box group - after update (I guess) it ceased showing the data!

    #2708
    chapkovskichapkovski
    Participant
    $checkgroup_prefix='filka_'; //тестируем как вообще работают группы
    //=============================
        
    	$meta_boxes[] = array(
    		'title'  => __( 'Тестируем', 'your-prefix' ),
    		'post_types' => array( 'post', 'page' ),
    		'show'   => array(
                'template'    => array( 'template-about-us.php' ),
    			),
    		'fields' => array(
    		        // группа  - редакция
    		        array(
    		            'name' => 'Тестируем поле', // Optional
    		            'id' => 'test_id',
    		            'type'   => 'group', // Group type
    		            'clone'=>false,
    		            // List of sub-fields
    		            'fields' => array(
    						//фио
    						array(
    							'name'  => __( 'ПРОВЕРКА', 'your-prefix' ),
    							'id'    => "{$checkgroup_prefix}fio",
    							'type'  => 'text',
    						),
    				
    					),
    		        ),
    
    		    ),
    	
    	);
    
    
    $group_values = rwmb_meta( 'test_id' );
    if ( ! empty( $group_values ) )
    {
        foreach ( $group_values as $group_value )
        {
            $value = isset( $group_value['filka_fio'] ) ? $group_value['filka_fio'] : '';
            echo $value.'<br>'; // Display sub-field value
            
        }
    }
    #2709
    chapkovskichapkovski
    Participant

    and that doesn't work even if the data in the field is stored in the mysql database

    #2710
    fauzifauzi
    Participant

    @Anh Tran
    Hi Anh Tran, can you give me your email?
    i need private support for my code with MB Group plugin

    #2711
    Anh TranAnh Tran
    Keymaster

    Just saw your email. Do you want to continue discussing here or via email? If nothing private, I think we should talk here.

    #2865
    CampMediaCampMedia
    Participant

    What was the result of this? I have the same problem, Willing to talk here about it so others can learn and resolve their problem.

    I can't even get this to return anything

    $group_values = rwmb_meta( 'sidebar_group' );
    var_dump($group_values);
    #2868
    CampMediaCampMedia
    Participant

    Solved my own problem.

    I forgot this needed to be within a Post/Page Loop, as well as my prefix wasn't rendering out as "fbm" it was being stored as code "{$prefix}_sidebar_group"

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘MB Group not display in post type’ is closed to new replies.