Support

Account

Home Forums ACF PRO Group fields – Error access array

Helping

Group fields – Error access array

  • Hello everyone,

    I’m trying for the first time the pro version of the plugin but I’m not able to display a group of fields without getting this error :

    Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\…

    This the code :

    <?php $wwdo = get_fields('what_we_do'); ?>
        <div class="what-we-do grid">
            <div class="what-we-do-content">
                <h3><?php $wwdo['titre'];?></h3>
                <?php $wwdo['text'];?>
    
                <a href="<?php $wwdo['cta']['link'];?>"><?php $wwdo['cta']['label'];?></a>
            </div>
        </div>

    And a screen of the concerned fields :
    screen
    Link of the screen if not displayed : https://pasteboard.co/JWbKDEJ.jpg

  • use get_field() instead of get_fields()
    <?php $wwdo = get_field('what_we_do'); ?>

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.