Home › Forums › ACF PRO › Simple Fields to ACF › Reply To: Simple Fields to ACF
Thanks! This is the code that ended up working:
$hero = simple_fields_fieldgroup('hero');
if (!empty($hero['video'])) {
$hero_video = $hero['video'];
} else if (empty($hero['video'])){
$hero_video = get_field('video');
} else {
$hero_video = '';
}
In simple fields first you have to call the field group array with simple_fields_fieldgroup()
Then I checked to see if simple fields is being used in the current post, if not then we move on the ACF, else leave it blank.
So far it works like a charm!
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.