Home › Forums › General Issues › Change WYSIWYG toolbars for specific fields only › Reply To: Change WYSIWYG toolbars for specific fields only
Since this topic still has some attention I came back to share my solution. I misunderstood the way of making a more simple toolbar. The current solution suites my needs:
if (class_exists('acf')) {
add_filter('acf/fields/wysiwyg/toolbars', 'wysiwyg_toolbars');
}
function wysiwyg_toolbars($toolbars) {
$toolbars['Very Very Simple'] = array();
$toolbars['Very Very Simple'][1] = array('bold', 'italic', 'underline', 'strikethrough');
$toolbars['Very Simple'] = array();
$toolbars['Very Simple'][1] = array('bold', 'italic', 'underline', 'strikethrough', 'link');
return $toolbars;
}
After that, you can assign the field type to your designated field, just like you normally would do.
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.