Home › Forums › General Issues › offset value of type bool › Reply To: offset value of type bool
The offset value notice did appear as long as the field “banner_image” is still empty.
My solution above was just to stop the notice.
Correct it should be like this, maybe somebody has a better way:
if (isset(get_field('banner_image', get_option('page_for_posts'))['url'])) {
$image = get_field('banner_image', get_option('page_for_posts'))['url'];
}
if(empty($image)){
$image = get_template_directory_uri().'/assets/img/breadcrumb/breadcrumb-bg-1.jpg';
}
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.