Section
Sections are where the Fields reside, you can have multiple Field in each Section. Also Section can be added in panel. You can add section using Yano::section()
method.
Yano::section( 'section_id', [
'title' => 'Section title',
'description' => 'Section description',
'priority' => 1,
] );
Adding section inside a panel, you just need to add panel
in section and copy the panel id
.
// you just need to add
// panel and copy panel id
Yano::section( 'section_id', [
'title' => 'Section title',
'description' => 'Section description',
'priority' => 1,
'panel' => 'panel_id'
] );
Parameters
Here are the parameters for creating section.
id
string | required
a unique slug-like string to use as an id.
title
string | required
the visible name of the panel.
description
string | optional
the description of the section, displayed at the top of the section.
priority
integer | optional
the order of panels appears in the Theme Customizer Sizebar.
panel
string | optional
the id of Panel where this section will be reside.
Note: value must be existing Panel id.