documentation

Creating Options

Creating Options

Options are the backbone of making Plato Pages work for your themes. A single option can have many classes attached to it for variations (primary hero, secondary hero, etc..)

Section

apply_filters('plato_section_options', [
[
  'title' => 'Background',
  'name' => 'section_bg',
'options' => [
  'hero' => [
'name'=> 'Hero',
'classes' => 'hero bg-primary'
],
    'white_bg' => [
'name'=> 'White BG',
  'classes' => 'bg-white'
  ]
]
]
]);

Rows

apply_filters('plato_row_options', [
   [
      'title' => 'Background',
      'name' => 'section_bg',
      'options' => [
         'hero' => [
            'name'=> 'Hero',
            'classes' => 'hero bg-primary'
         ],
         'white_bg' => [
            'name'=> 'White BG',
            'classes' => 'bg-white'
         ]
      ]
   ]
]);

Columns

apply_filters('plato_column_options', [
   [
      'title' => 'Background',
      'name' => 'section_bg',
      'options' => [
         'hero' => [
            'name'=> 'Hero',
            'classes' => 'hero bg-primary'
         ],
         'white_bg' => [
            'name'=> 'White BG',
            'classes' => 'bg-white'
         ]
      ]
   ]
]);