Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function roots_customize_register( $wp_customize ) {
- $wp_customize->add_section( 'roots_theme_section_nav' , array(
- 'title' => __('Navigation Colors','roots'),
- ) );
- $wp_customize->add_setting( 'roots_theme_options[nav_bg]' , array(
- 'default' => '#FAFAFA',
- ) );
- $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'nav_bg', array(
- 'label' => __( 'Background color', 'roots' ),
- 'section' => 'roots_theme_section_nav',
- 'settings' => 'roots_theme_options[nav_bg]',
- ) ) );
- }
- function roots_customize_css() {
- ?>
- <style type="text/css">
- .navbar-inner { background-color:<?php echo get_theme_mod('roots_theme_options[nav_bg]'); ?>; }
- </style>
- <?php
- }
- add_action( 'customize_register', 'roots_customize_register' );
- add_action( 'wp_head', 'roots_customize_css');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement