Support

Account

Home Forums ACF PRO Simple Fields to ACF Reply To: Simple Fields to ACF

  • @james,

    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!