Complete Theme Options Panel developed using CMB2. - Easy to integrate and extend
Anyone can use this theme options panel in their projects. It support all fields types of CMB2.
First of all clone this repository and place in your theme directory. Then add following line in functions.php
require_once dirname( __FILE__ ) . '/theme_options.php';
Once you have done this step you can see Theme options Menu in your Admin dashboard. Now open file custom_posts.php and customize this according to your needs.
To use your theme options values in frontend you can use following examples
global $myTheme_options;
$myTheme_options=get_site_option( 'options-page', true, false) ;
$site_title = $myTheme_options['site_title'];
$site_logo = $myTheme_options['site_logo'];
Examples:
Please follow me at https://profiles.wordpress.org/sajiddesigner/