WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. M Szatkowski
    Member
    Posted 1 year ago #

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

    My benefits.php:

    <?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? :)

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. M Szatkowski
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.