Christmas Sale! Get 69% OFF for All Publii Themes Get the pack!

Christmas Sale 69% OFF! All Publii Themes

GitHub Download

Switcher

For situations where you want to allow users to just enable or disable some options, you can consider the switcher field which allows only two values - true or false:

{
    "name": "lazyLoad",
    "label": "Lazyload",
    "group": "Additional",
    "note": "Enables lazyloading images that are currently not viewed, thus saving bandwidth.",
    "value": true,
    "type": "checkbox"
}
Switcher HTML

The switcher fields are great to handle conditional display of other options with use of the dependencies parameter described under Theme Settings API.

Subscribe

Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at contact@tidycustoms.net. By clicking below, you agree that we may process your information in accordance with our Privacy Policy.