RiseOptions Documentation Live Theme Customizer for WordPress

Installation

  1. Clone the repository into your theme folder
  2. Include the RiseOptions.php file in your theme's functions.php file with this line of code:

include get_template_directory() . '/rise-options/RiseOptions.php';
			

Create A Section

For creating a new section you need to use the following code:


RiseOptions::section($name, $description);
			

Create A Field

For creating a new field you need to use the following code:


RiseOptions::text($id, $title, $default);
				

This code will create a new text field type.

For displaying all supported field types you can use this function:


RiseOptions::getSupportedTypes();
				

List of all supported field types: text, checkbox, radio, select, pages, image, color, upload, textarea, number, date

Displaying Field

For accessing the saved field data everywhere in your theme you can use this code:


RiseOptions::get($id, $default);
				

Example

Below you will see a simple example of usage:


RiseOptions::section('Main Options'); // create a new section
RiseOptions::image('image_logo', 'Upload Your Logo'); // create a image type field
RiseOptions::checkbox('test_checkbox', 'The Checkbox Field', true); // create a checkbox field
RiseOptions::radio('sidebar_position', 'The Sidebar Position', 'right', array(
	'right' => 'Sidebar right',
	'left' => 'Sidebar left'
)); // create a radio type field

RiseOptions::section('Another Section', 'this is another section'); // create another section
RiseOptions::textarea('analytics', 'Place Your Analytics Data'); // create a textarea field
RiseOptions::color('test_color', 'Main Color', '#000000'); // create a color field