__( 'Blog Sidebar', 'twentytwelve' ), 'id' => 'sidebar-1', 'description' => __( 'Appears in your blog area.', 'twentytwelve' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'First Footer Widget', 'twentytwelve' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets to the first footer column.', 'twentytwelve' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Second Footer Widget', 'twentytwelve' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets to the second footer column.', 'twentytwelve' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Third Footer Widget', 'twentytwelve' ), 'id' => 'sidebar-4', 'description' => __( 'Add widgets to the third footer column.', 'twentytwelve' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'twentytwelve' ), 'id' => 'sidebar-5', 'description' => __( 'Appears in pages.', 'twentytwelve' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'child_twentytwelve_widgets_init', 30 ); // Enqueues our external font awesome stylesheet function enqueue_our_required_stylesheets(){ wp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'); } add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets'); // Add wide-width body tag for page builder support add_filter( 'body_class', 'child_twentytwelve_body_class' ); function child_twentytwelve_body_class( $classes ) { if ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width-builder.php' ) ) $classes[] = 'wide-width'; return $classes; } // Remove sections from Customizer add_action( "customize_register", "child_twentytwelve_theme_customize_register" ); function child_twentytwelve_theme_customize_register( $wp_customize ) { $wp_customize->remove_control("header_image"); $wp_customize->remove_panel("widgets"); $wp_customize->remove_control("background_color"); //$wp_customize->remove_section("colors"); $wp_customize->remove_section("background_image"); //$wp_customize->remove_section("static_front_page"); } // Add logo upload to Customizer function child_twentywelve_customize_register( $wp_customize ) { $wp_customize->add_setting( 'twentytwelve_logo' ); // Add setting for logo uploader // Add control for logo uploader (actual uploader) $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'twentytwelve_logo', array( 'label' => __( 'Upload Logo (Best fit 240x75px)', 'twentytwelve' ), 'section' => 'title_tagline', 'settings' => 'twentytwelve_logo', ) ) ); } add_action( 'customize_register', 'child_twentywelve_customize_register' ); // Add color control to customizer add_action( 'customize_register', 'child_twentytwelve_color_customize_register' ); function child_twentytwelve_color_customize_register( $wp_customize ) { // Add link color setting (Main Accent) $wp_customize->add_setting( 'ttc_link_color', array( 'default' => '#3998f0', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'ttc_link_color', array( 'label' => __( 'Main Accent', 'twentytwelve' ), 'section' => 'colors', 'settings' => 'ttc_link_color' ) ) ); // Add header nav color setting $wp_customize->add_setting( 'ttc_nav_color', array( 'default' => '#323a42', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'ttc_nav_color', array( 'label' => __( 'Secondary Accent', 'twentytwelve' ), 'section' => 'colors', 'settings' => 'ttc_nav_color' ) ) ); // Add header color setting $wp_customize->add_setting( 'ttc_header_color', array( 'default' => '#363f48', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'ttc_header_color', array( 'label' => __( 'Header Color', 'twentytwelve' ), 'section' => 'colors', 'settings' => 'ttc_header_color' ) ) ); // Add link color setting (Main Accent) $wp_customize->add_setting( 'ttc_link_color_nav', array( 'default' => '#FFFFFF', ) ); $wp_customize->add_control(new WP_Customize_Color_Control( $wp_customize, 'ttc_link_color_nav', array( 'label' => __( 'Menu Link Color', 'twentytwelve' ), 'section' => 'colors', 'settings' => 'ttc_link_color_nav' ) ) ); } // Add user settings add_action( 'wp_head', 'child_twentytwelve_customizer_css' ); function child_twentytwelve_customizer_css() { ?> 'Easy Social Icons', 'slug' => 'easy-social-icons', 'required' => false, ), array( 'name' => 'WP Responsive Menu', 'slug' => 'wp-responsive-menu', 'required' => false, ), ); $config = array( 'id' => 'child_twentytwelve', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => true, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); } // Add credit to footer add_action( 'twentytwelve_credits', 'twentytwelve_clean_design_credits_handler' ); function twentytwelve_clean_design_credits_handler() { ?> Theme by Websitehelper.co.uk |