__( 'Header Menu', 'alpha_lite' ) ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', 'gallery', 'caption', ) ); } endif; // alpha_lite_setup add_action( 'after_setup_theme', 'alpha_lite_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function alpha_lite_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'alpha_lite' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '', ) ); } add_action( 'widgets_init', 'alpha_lite_widgets_init' ); /** * Enqueue scripts and styles. */ function alpha_lite_scripts() { wp_enqueue_style( 'alpha_lite-style', get_stylesheet_uri() ); wp_enqueue_style( 'googlefonts', '//fonts.googleapis.com/css?family=Droid+Sans:700|Nobile:400,400italic,700' ); wp_enqueue_style( 'fontawesome', get_stylesheet_directory_uri() . '/inc/fonts/font-awesome/css/font-awesome.min.css' ); wp_enqueue_script( 'alpha_lite-navigation', get_template_directory_uri() . '/js/navigation.js', array(), AL_VERSION, true ); wp_enqueue_script( 'alpha_lite-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), AL_VERSION, true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'alpha_lite_scripts' ); /** * 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'; /** * fallback for empty nav menus */ function alpha_lite_nav_fallback() { ?>
is_search && !is_admin() ) $query->set( 'post_type', 'post' ); return $query; } add_filter( 'pre_get_posts','alpha_lite_search_filter' );