Support

Account

Home Forums General Issues Fatal error: Call to undefined function add_row() in …

Solving

Fatal error: Call to undefined function add_row() in …

  • Hi there

    I’m trying to use the add_row($selector, $value, $post_id) function in my functions.php – it is a field already existing which I want to add a value to a post to.

    But I get the error:

    Fatal error: Call to undefined function add_row() in …

    Is the function not included as default ? I can use the the_field() and get_field() in functions.php without any problems…

    If not, how/what should I include ?

    Cheers
    Adam

  • update:

    I have inserted :

    if(!function_exists(‘add_row’)) {
    include(ABSPATH . “wp-content/plugins/advanced-custom-fields-pro/acf.php”);

    }

    in my custom function but With no effect…

    //Adam

  • Hi @a42,

    Thanks for the post.

    I would recommend you call the function within the acf/init action as described here: https://www.advancedcustomfields.com/resources/acfinit/

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

The topic ‘Fatal error: Call to undefined function add_row() in …’ is closed to new replies.