ACF Show Checkbox Choice With Icon Only When Value Checked

This code enables you to add icons to each checkbox choice. The icon and name for each choice is only displayed when the checkbox is checked.

Here’s the checkbox choice values available from the edit screen :

And here’s an example of whats shown on the front end :

If nil checkboxes are checked, the title and choices do not display.

You can use Dashicons however they are limited so you may find Font Awesome provide a larger range of icons to choose from.

Register or login to access the code for members :

Related Tutorials


Comments

2 responses to “ACF Show Checkbox Choice With Icon Only When Value Checked”

  1. Jonathan Bowles Avatar
    Jonathan Bowles

    Is it possible to use the same code for a plugin/widget?

    1. Brad Dalton Avatar
      Brad Dalton

      Not clear to me what you mean by plugin/widget.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.