Support

Account

Forum Replies Created

  • Thanks @jonathan

    I think the issue is I was calling get_field with the field key instead of the field name. It seems that ACF returns an empty object for this if there is no value. When I switched to the field name, I stopped getting errors.

  • Was just a typo!

    `$member[‘location_details’] = array(‘address’ => $formatted_address, ‘lat’ => $centre_lat, ‘lng’ => $centre_long, ‘zoom’ => 14);

  • I had this too. I was adding fields to categories but they weren’t showing up. Reverted to 5.1.9 and they are back. That was a waste of 3 hours.

  • I know this post is from a while ago now but I had a similar issue. I solved it like so:

        <?php if (have_rows('flexible_content')) : 
    
            while (have_rows('flexible_content')) : the_row();
    
               if (get_row_layout() == 'images_row'):
    
                   $header = get_sub_field('heading'); ?>
                   <div class="block-text-centered">
                        <h2 class="upper grey"><?php echo $header;?></h2>
                   </div>
    
                   <?php $rows = get_sub_field('images');
    
                    if ($rows) : ?>
                        <div class="pure-g">
                        <?php foreach ($rows as $row) : $img = wp_get_attachment_image_src($row['ID'], 'thumbnail'); ?>
                            <div class="pure-u-1-5 client-logo">
                                <img src="<?php echo $img[0]; ?>" alt="<?php echo $row['alt']; ?>">
                            </div>
                    <?php endforeach; ?>
                        </div>
                    <?php endif;
    
                endif; 
    
            endwhile;
    
        else :
    
        endif; ?>
    
Viewing 4 posts - 1 through 4 (of 4 total)