Support

Account

Home Forums General Issues Group item inside of group

Unread

Group item inside of group

  • Hi, I would like to make group item inside group item.
    Please see the code below – what could be problem, that I receve white screen

    <?php
    
                                // vars
                                $data = get_field('main_group');	
                        
                                if( $data ): ?>
                                    <h2> <?php _e('field Name 1')?></h2>
                                    <p class="field_1">
                                        <?php if( get_field('field_2') ): ?> 
                                                 <?php _e('Field name 2')?></p> <?php echo $data['field_2']; ?>     
                                        <?php endif; ?>
                                        <?php if( get_field('field_3') ): ?>  
                                                <?php _e('Field name 3 ')?> <?php echo $data['field_3']; ?>
                                        <?php endif; ?>
                                         <?php _e('Field name 4 ') // here I want to start another group 8group name second_group
                                                             if( have_rows('main_group') ):
                                                                while( have_rows('main_group') ): the_row();
                                                                // vars
                                                                $group-item = get_sub_field('second_group');
                                                                ?>
                                                                <?php echo get_sub_field('second_group_item1');°C?> <?php _e('-')?> <?php echo get_sub_field('second_group_item1');°C //to be displayed as celsius (-2°C - +5°C )?>
                                        <?php endif; ?>  
                                        <?php if( get_field('Field name 5') ): ?> 
                                                <?php _e('field_5')?> <?php echo $data['field_5']; ?>   
                                        <?php endif; ?>
    ?>
Viewing 1 post (of 1 total)

The topic ‘Group item inside of group’ is closed to new replies.