__( 'Primary Menu', 'aplos' ), ) ); } endif; // aplos_setup add_action( 'after_setup_theme', 'aplos_setup' ); /** * Register widgetized area and update sidebar with default widgets * * @since Aplos 1.0.0 */ function aplos_widgets_init() { register_sidebar( array( 'name' => __( 'Primary Widget Area', 'aplos' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'aplos' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'aplos_widgets_init' ); //add color selectors to Appearance menu function aplos_customize_register($wp_customize) { //Layout Section $wp_customize->add_section( 'aplos_layout_choice_section' , array( 'title' => __( 'Layout', 'aplos' ), 'priority' => 30, 'description' => __('Allows you to customize page layout.', 'aplos'), ) ); //Layout settings $wp_customize->add_setting( 'layout_choices', array( 'default' => 'twocol', ) ); //Color settings $wp_customize->add_setting( 'title_color', array( 'default' => '#DC3D24', 'type' => 'theme_mod', ) ); $wp_customize->add_setting( 'themebg_color', array( 'default' => '#232B2B', 'type' => 'theme_mod', ) ); $wp_customize->add_setting( 'link_color', array( 'default' => '#8F1E0C', 'type' => 'theme_mod', ) ); $wp_customize->add_setting( 'link_hover_color', array( 'default' => '#EE6D59', 'type' => 'theme_mod', ) ); //Layout Controls $wp_customize->add_control( 'layout_choices', array( 'type' => 'radio', 'label' => 'Select Layout', 'section' => 'aplos_layout_choice_section', 'choices' => array( 'twocol' => 'Two Columns', 'threecol' => 'Three Columns', ), ) ); //Color Controls $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, //Pass the $wp_customize object (required) 'aplos_title_color', //Set a unique ID for the control array( 'label' => __( 'Title Color', 'aplos' ), //Admin-visible name of the control 'section' => 'colors', //ID of the section this control should render in (can be one of yours, or a WordPress default section) 'settings' => 'title_color', //Which setting to load and manipulate (serialized is okay) 'priority' => 10, //Determines the order this control appears in for the specified section ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aplos_themebg_color', //Set a unique ID for the control array( 'label' => __( 'Background Color', 'aplos' ), 'section' => 'colors', 'settings' => 'themebg_color', 'priority' => 5, ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aplos_link_color', //Set a unique ID for the control array( 'label' => __( 'Link Color', 'aplos' ), 'section' => 'colors', 'settings' => 'link_color', 'priority' => 15, ) ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aplos_link_hover_color', //Set a unique ID for the control array( 'label' => __( 'Link Hover Color', 'aplos' ), 'section' => 'colors', 'settings' => 'link_hover_color', 'priority' => 20, ) ) ); } function aplos_customize_css() { $layoutchoice = get_theme_mod('layout_choices'); switch($layoutchoice){ case 'twocol': ?>