'http://navthemes.com/branding/inthemes/logo.png', 'url_path' => get_stylesheet_directory_uri() . '/admin/kirki/' ); return $args; } add_filter( 'kirki/config', 'navthemes_configuration' ); /*------------------------------------------ Config ------------------------------------------*/ Kirki::add_config( 'truewest', array( 'capability' => 'edit_theme_options', 'option_type' => 'theme_mod', ) ); /* NavThemes Branding */ Kirki::add_section( 'navthemes_support', array( 'title' => __( 'NavThemes Support', 'truewest' ), 'description' => __( 'You are using Free version of TrueWest Theme, Check out Paid version, which comes with many exciting features in the package.' , 'truewest' ), 'priority' => 1, ) ); Kirki::add_field( 'truewest', array( 'type' => 'custom', 'settings' => 'navthemes_support', 'section' => 'NavThemes_Support', 'default' => '', 'priority' => 10, ) ); /*------------------------------------------ Home Page Panel ------------------------------------------*/ Kirki::add_panel( 'homepage', array( 'priority' => 10, 'title' => __( 'Front Page Settings', 'truewest' ), 'description' => __( 'Manage Front Page Setting from here', 'truewest' ), ) ); /*------------------------------------------ Home Slider Section ------------------------------------------*/ Kirki::add_section( 'homepage_slider', array( 'title' => __( 'Slider Settings', 'truewest' ), 'description' => __( 'From here you can manage background image, Title and Text of Sliders', 'truewest' ), 'panel' => 'homepage', 'priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => '', // Rarely needed. ) ); /*------------------------------------------ Add Fields to Home Page Section ------------------------------------------*/ // Switch Kirki::add_field( 'truewest', array( 'type' => 'switch', 'settings' => 'slider_active', 'label' => __( 'Slider Active', 'truewest' ), 'description' => __( 'You Can On/Off Front Page Slider from here', 'truewest' ), 'section' => 'homepage_slider', 'default' => '1', 'priority' => 10, ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_title1', 'label' => __( 'Slider Title 1', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'Slider One Title', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_text1', 'label' => __( 'Slider Text 1', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'You can have anything here, which makes a good impression on your visitor', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_image1', 'label' => __( 'Slider Image 1', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/slider-1.jpg', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_title2', 'label' => __( 'Slider Title 2', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'Slider Two Title', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_text2', 'label' => __( 'Slider Text 2', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'You can have anything here, which makes a good impression on your visitor', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_image2', 'label' => __( 'Slider Image 2', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/slider-2.jpg', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_title3', 'label' => __( 'Slider Title 3', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'Slider Three Title', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_text3', 'label' => __( 'Slider Text 3', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'text', 'priority' => 10, 'default' => 'You can have anything here, which makes a good impression on your visitor', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'slider_image3', 'label' => __( 'Slider Image 3', 'truewest' ), 'section' => 'homepage_slider', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/slider-3.jpg', ) ); /*------------------------------------------ Home Page About us Section ------------------------------------------*/ Kirki::add_section( 'homepage_aboutus', array( 'title' => __( 'About us Setting' , 'truewest' ), 'description' => __( 'From here you can manage Home Page about us section' , 'truewest' ), 'panel' => 'homepage', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_aboutus_title', 'label' => __( 'About us Title', 'truewest' ), 'section' => 'homepage_aboutus', 'type' => 'text', 'priority' => 10, 'default' => 'you can have anything here which is related to your about us', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_aboutus_text', 'label' => __( 'About us Text', 'truewest' ), 'section' => 'homepage_aboutus', 'type' => 'textarea', 'priority' => 10, 'default' => 'Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis. Vivamus et fringilla ligula. Etiam sapien tellus, imperdiet eget posuere nec, cursus vel arcu. Ut molestie at posuere ante, at volutpat tellus egestas. Sed ut nunc egestas, porta tortor a, tempor sem.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_aboutus_readmore_switch', 'label' => __( 'Show Read More', 'truewest' ), 'section' => 'homepage_aboutus', 'type' => 'toggle', 'priority' => 10, 'default' => 1, ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_aboutus_readmore_link', 'label' => __( 'Read More link', 'truewest' ), 'section' => 'homepage_aboutus', 'type' => 'text', 'priority' => 10, 'default' => '#', 'required' => array( array( 'setting' => 'homepage_aboutus_readmore_switch', 'operator' => '==', 'value' => 1, ), ) ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_aboutus_image', 'label' => __( 'About us Image', 'truewest' ), 'section' => 'homepage_aboutus', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/about_us.jpg', ) ); /*------------------------------------------ Home Page Services Section ------------------------------------------*/ Kirki::add_section( 'homepage_services', array( 'title' => __( 'Services', 'truewest' ), 'description' => __( 'From here you can manage Home Page about us section' , 'truewest' ), 'panel' => 'homepage', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_title1', 'label' => __( 'Services Title 1', 'truewest' ), 'section' => 'homepage_services', 'type' => 'text', 'priority' => 10, 'default' => 'Services Title One', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_text1', 'label' => __( 'Services Text 1', 'truewest' ), 'section' => 'homepage_services', 'type' => 'textarea', 'priority' => 10, 'default' => 'You can anything related to your Services. Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_image1', 'label' => __( 'Services Image 1', 'truewest' ), 'section' => 'homepage_services', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/service-image-1.jpg', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_title2', 'label' => __( 'Services Title 2', 'truewest' ), 'section' => 'homepage_services', 'type' => 'text', 'priority' => 10, 'default' => 'Services Title Two', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_text2', 'label' => __( 'Services Text 2', 'truewest' ), 'section' => 'homepage_services', 'type' => 'textarea', 'priority' => 10, 'default' => 'You can anything related to your Services. Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_image2', 'label' => __( 'Services Image 3', 'truewest' ), 'section' => 'homepage_services', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/service-image-2.jpg', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_title3', 'label' => __( 'Services Title 3', 'truewest' ), 'section' => 'homepage_services', 'type' => 'text', 'priority' => 10, 'default' => 'Services Title Three', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_text3', 'label' => __( 'Services Text 3', 'truewest' ), 'section' => 'homepage_services', 'type' => 'textarea', 'priority' => 10, 'default' => 'You can anything related to your Services. Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_services_image3', 'label' => __( 'Services Image 3', 'truewest' ), 'section' => 'homepage_services', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/service-image-3.jpg', ) ); /*------------------------------------------ Home Page Testimonial Section ------------------------------------------*/ Kirki::add_section( 'homepage_testimonial', array( 'title' => __( 'Testimonials', 'truewest' ), 'description' => __( 'From here you can manage Testimonials', 'truewest' ), 'panel' => 'homepage', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_title', 'label' => __( 'Testimonial Title', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'text', 'priority' => 10, 'default' => 'Testimonials', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_text', 'label' => __( 'Testimonial Text', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'textarea', 'priority' => 10, 'default' => 'Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_client1', 'label' => __( 'Client 1', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'text', 'priority' => 10, 'default' => 'Client 1', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_text1', 'label' => __( 'Testimonial 1', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'textarea', 'priority' => 10, 'default' => 'Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis.', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_client2', 'label' => __( 'Client 2', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'text', 'priority' => 10, 'default' => 'Client 2', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_text2', 'label' => __( 'Testimonial 2', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'textarea', 'priority' => 10, 'default' => 'Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis. ', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_client3', 'label' => __( 'Client 3', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'text', 'priority' => 10, 'default' => 'Client 2', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'homepage_testimoial_text3', 'label' => __( 'Testimonial 3', 'truewest' ), 'section' => 'homepage_testimonial', 'type' => 'textarea', 'priority' => 10, 'default' => 'Pellentesque nulla magna, accumsan sed ante quis, gravida feugiat turpis. ', ) ); /*------------------------------------------ General Settings ------------------------------------------*/ Kirki::add_panel( 'general_settings', array( 'priority' => 2, 'title' => __( 'General Settings', 'truewest' ), 'description' => __( 'Manage General Setting from here', 'truewest' ), ) ); /*------------------------------------------ General Section ------------------------------------------*/ Kirki::add_section( 'general_settings', array( 'title' => __( 'General Settings', 'truewest' ), 'description' => __( 'From Here You Can Manage Some General Settings' , 'truewest' ), 'panel' => 'general_settings', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'inner_page_bg_image', 'label' => __( 'Inner Pages Title Background image', 'truewest' ), 'section' => 'general_settings', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/slider-1.jpg', //'active_callback' => 'is_not_front_page', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'top_top', 'label' => __( 'Show Top Button', 'truewest' ), 'section' => 'general_settings', 'type' => 'toggle', 'priority' => 10, 'default' => 1, ) ); Kirki::add_section( 'social_settings', array( 'title' => __( 'Social Settings', 'truewest' ), 'description' => __( 'From Here You Can Manage Some Social Settings' , 'truewest' ), 'panel' => 'general_settings', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'social_facebook', 'label' => __( 'Facebook', 'truewest' ), 'section' => 'social_settings', 'type' => 'url', 'priority' => 10, 'default' => '#', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'social_twitter', 'label' => __( 'Twiiter', 'truewest' ), 'section' => 'social_settings', 'type' => 'url', 'priority' => 10, 'default' => '#', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'social_pinterest', 'label' => __( 'Pinterest', 'truewest' ), 'section' => 'social_settings', 'type' => 'url', 'priority' => 10, 'default' => '#', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'social_tumblr', 'label' => __( 'Tumblr', 'truewest' ), 'section' => 'social_settings', 'type' => 'url', 'priority' => 10, 'default' => '#', ) ); Kirki::add_section( 'logo_settings', array( 'title' => __( 'Logo Settings', 'truewest' ), 'description' => __( 'From Here You Can Manage Manage Settings' , 'truewest' ), 'panel' => 'general_settings', 'priority' => 160, 'capability' => 'edit_theme_options', ) ); Kirki::add_field( 'truewest', array( 'settings' => 'logo', 'label' => __( 'Logo', 'truewest' ), 'section' => 'logo_settings', 'type' => 'image', 'priority' => 10, 'default' => get_template_directory_uri() . '/images/logo.png', ) ); /* function is_not_front_page() { if(!is_front_page()) return true; else false; }*/ /*------------------------------------------ Customizer CSS ------------------------------------------*/ function customizer_css() { // Loads our main stylesheet. wp_enqueue_style( 'customizer-css', get_template_directory_uri().'/customizer.css' ); } add_action( 'customize_controls_print_styles', 'customizer_css');