__( 'Primary Menu', 'aplos' ), ) ); if ( ! isset( $content_width ) ) { $content_width = 654; } } 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' ); // Filter the wp_title tag function aplos_wp_title($title, $sep){ if(is_feed()){ return $title; } global $page, $paged; // Add blog name $title .= get_bloginfo('name','display'); //Add blog description for home page $site_description = get_bloginfo('description','display'); if ( $site_description && ( is_home() || is_front_page() ) ) { $title .= " $sep $site_description"; } // Add page number if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) { $title .= " $sep " . sprintf( __( 'Page %s', '_s' ), max( $paged, $page ) ); } return $title; } add_filter('wp_title','aplos_wp_title',10,2); //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'), ) ); //Fonts Section $wp_customize->add_section( 'aplos_fonts_choice_section' , array( 'title' => __( 'Fonts', 'aplos' ), 'priority' => 30, 'description' => __('Allows you to change the font of post titles (Verdana is suggested for languagues with characters other than the basic Latin alphabet).', 'aplos'), ) ); //Layout settings $wp_customize->add_setting( 'layout_choices', array( 'default' => 'twocol', ) ); //Fonts settings $wp_customize->add_setting( 'fonts_choices', array( 'default' => 'bebas', 'type' => 'theme_mod', ) ); //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', 'aplos'), 'section' => 'aplos_layout_choice_section', 'choices' => array( 'twocol' => __('Two Columns', 'aplos'), 'threecol' => __('Three Columns', 'aplos'), ), ) ); //Color Controls $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, '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 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 ) ) ); //Fonts Controls $wp_customize->add_control( 'fonts_choices', array( 'type' => 'select', 'label' => __('Select Post Title Font', 'aplos'), 'section' => 'aplos_fonts_choice_section', 'choices' => array( 'bebas' => __('Theme Default', 'aplos'), 'verdana' => __('Verdana', 'aplos'), ), ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'aplos_themebg_color', 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', 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', array( 'label' => __( 'Link Hover Color', 'aplos' ), 'section' => 'colors', 'settings' => 'link_hover_color', 'priority' => 20, ) ) ); } function aplos_customize_css() { //Layout choices $layoutchoice = get_theme_mod('layout_choices'); switch($layoutchoice){ case 'twocol': ?>