tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'govpress' ), 'icon' => __( 'Icon Menu', 'govpress' ), ) ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'govpress_custom_background_args', array( 'default-color' => 'f8f8f8', 'default-image' => '', ) ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) ); // Enable support for post thumbnails. add_theme_support( 'post-thumbnails' ); // Post editor styles add_editor_style( 'editor-style.css' ); // Theme layouts add_theme_support( 'theme-layouts', array( 'single-column' => __( '1 Column', 'govpress' ), 'sidebar-right' => __( '2 Columns: Content / Sidebar', 'govpress' ), 'sidebar-left' => __( '2 Columns: Sidebar / Content', 'govpress' ) ), array( 'default' => 'sidebar-right' ) ); } endif; // govpress_setup add_action( 'after_setup_theme', 'govpress_setup' ); /** * Register widgetized area and update sidebar with default widgets. */ function govpress_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'govpress' ), 'id' => 'primary', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Page Hero', 'govpress' ), 'id' => 'home-page-hero', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Page Featured', 'govpress' ), 'id' => 'home-page-featured', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area One', 'govpress' ), 'id' => 'footer-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area Two', 'govpress' ), 'id' => 'footer-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Area Three', 'govpress' ), 'id' => 'footer-3', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Text', 'govpress' ), 'id' => 'footer-text', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'govpress_widgets_init' ); /** * Enqueue scripts and styles. */ function govpress_scripts() { wp_enqueue_style( 'govpress-style', get_stylesheet_uri(), GOVPRESS_VERSION ); // Use style-rtl.css for RTL layouts wp_style_add_data( 'govpress-style', 'rtl', 'replace' ); if ( SCRIPT_DEBUG || WP_DEBUG ) : wp_enqueue_script( 'govpress-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), GOVPRESS_VERSION, true ); wp_enqueue_script( 'govpress-fit-vids', get_template_directory_uri() . '/js/jquery.fitvids.js', array(), GOVPRESS_VERSION, true ); wp_enqueue_script( 'govpress-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), GOVPRESS_VERSION, true ); else : wp_enqueue_script( 'govpress-theme', get_template_directory_uri() . '/js/combined-min.js', array( 'jquery' ), GOVPRESS_VERSION, true ); endif; if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'govpress_scripts' ); /** * Enqueue fonts */ function govpress_fonts() { wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/fonts/font-awesome/font-awesome.css', array(), '4.5.0' ); /* Translators: If there are characters in your language that are not * supported by Open Sans, translate this to 'off'. Do not translate * into your own language. */ $font = _x( 'active', 'Open Sans font: active or inactive', 'govpress' ); if ( 'inactive' !== $font ) : $font_families = array(); $font_families[] = 'Open Sans:300italic,400italic,600italic,700italic,400,600,700,300'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $font_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); wp_enqueue_style( 'govpress-open-sans', $font_url, array(), null, 'screen' ); endif; } add_action( 'wp_enqueue_scripts', 'govpress_fonts' ); /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Custom functions that act independently of the theme templates. */ require get_template_directory() . '/inc/extras.php'; /** * Customizer additions. */ require get_template_directory() . '/inc/customizer.php'; /** * Load Jetpack compatibility file. */ require get_template_directory() . '/inc/jetpack.php'; /** * Icon Menu Walker */ require get_template_directory() . '/inc/icon-menu-extras.php'; /** * Layout options */ require get_template_directory() . '/inc/theme-layouts.php';