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/