Toggle Field

An on/off switch.

The Toggle field is an on/off switch: show a banner, feature a post, enable an option.

Configuration

Go to Modern Fields > Fields groups and add the Toggle field. It has no setting of its own.

Display the value

The field stores true or false. Test it with get_field():

PHP

With Modern Fields Pro, a toggle can show or hide other fields with Conditional logic, and filter a Query Loop.


Button Group Field

Range Field


In this documentation