Skip to content

Range

A number chosen with a slider, such as an opacity or a size.

In the editor

A range field in the editor, with its minimum, maximum, default value and decimals

A range has the same settings as the number field: Minimum value, Maximum value, Default value, Decimals and Text after input field, besides the settings every field shares.

On the options page

The range field on the options page: a slider with the value 80 and a percent sign after it

The chosen number is shown next to the slider, and changes while you drag.

The value

Stores the number, like the number field: rounded to the number of decimals, and empty when it is below the minimum or above the maximum.

On your website

[aop_option name="header_opacity"]%
$opacity = (int) get_option( 'header_opacity', 80 ) / 100;