acf-builder
acf-builder copied to clipboard
I could not get setWrapper to work.
Hi,
does anyone know how to use setWrapper. I tried this and I could not get it to work.
$banner = new StoutLogic\AcfBuilder\FieldsBuilder('banner');
$banner
->addText('title')
->addWysiwyg('content')
->setWrapper(['class' => 'foo', 'id' => 'bar', 'width' => '50'])
->addImage('background_image')
->setLocation('post_type', '==', 'page')
->or('post_type', '==', 'post');
add_action('acf/init', function () use ($banner) {
acf_add_local_field_group($banner->build());
});