Need a custom WYSIWYG toolbar configuration? Use this snippet.

This snippet will allow you to register a custom toolbar configuration for your WYSIWYG fields. This is super handy when you need to give the user basic controls such as text colour and linking without all the added bits and pieces that come with the basic toolbar option.

add_filter( 'acf/fields/wysiwyg/toolbars', function ( $toolbars ) {
$toolbars['Bare'] = [];
$toolbars['Bare'][1] = [ 'forecolor', 'link', 'strikethrough', 'bold', 'italic' ];
return $toolbars;
} );

Keep up to date with all things ACF!

Subscribe to our newsletter or follow @awesomeacf on Twitter!