Home › Forums › General Issues › get_field returning null after update › Reply To: get_field returning null after update
it’s most like my code just some differences:
1) i set third parameter as 1 (small difference i think)
add_filter('acf/settings/load_json', 'red_template_json_load_point', 1);
add_filter('acf/settings/save_json', 'red_template_json_save_point', 1);
function red_template_json_load_point( $paths ) {
// remove original path (optional)
unset($paths[0]);
// append path
$paths[] = get_template_directory() . '/includes/acf_json';
// return
return $paths;
}
function red_template_json_save_point( $path ) {
// update path
$path = get_template_directory() . '/includes/acf_json';
// return
return $path;
}
2) i use “options” and not “option”. Perhaps this?
$red_tmp_font_h1_font = get_field("h1_red_tmp_font_h1_font","options");
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.