Advanced Custom Fields
Fatal errorget_field when include/require (2 posts)

  1. M
    Posted 3 years ago #

    Hi I include external php file benefits.php thanks to PHP-Exec plugin in the post.

    My benefits.php:

    if( in_array( '1ghz', get_field('benefitsicons') ) )
        echo ...1GHZ!!!!
    <?php } ?>

    The thing is that I receive:

    Fatal error: Call to undefined function get_field() in /home/(...)source(...)/benefits.php on line 2

    When I put the benefits.php source into the post, everything works as a charm...

    Do you have a clue how to solve it? :)


  2. M
    Posted 3 years ago #

    What I'd like to do is to print <li>1ghz</li> element when 1ghz checkbox is selected..

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.