Support

Account

Home Forums ACF PRO Uncaught Error: Call to undefined function the_field()

Solving

Uncaught Error: Call to undefined function the_field()

  • Hi everyone

    I am using ACF Pro with Gutenberg and have spent the better part of a day trying to get this to work.

    My current issue is:

    Uncaught Error: Call to undefined function the_field()

    Which appears to be flagged right at the start on this line:

    <div class=”featured-listing-content hang-left <?php the_field (‘listing_background_colour’ );?>”>

    You can see the full php code here:

    http://sandbox.onlinephpfunctions.com/code/576b194a2fd93b0e21a8f52af29b6fd11b0bf7fb

    I can’t work out what it is I am doing wrong??

    I’m very new to ACF and PHP so this is quite a complex setup for me – any help would be much appreciated

  • Apologies the undefined function is not the error – it is a critical error that takes the site down

  • Solved – I had missed a closing bracket AND entered a value for the last if/else statement

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

The topic ‘Uncaught Error: Call to undefined function the_field()’ is closed to new replies.