__( 'Primary Menu', 'blissful-blog' ), ) ); /** * Setup the WordPress core custom background feature. */ add_theme_support( 'custom-background', apply_filters( 'blissful_blog_custom_background_args', array( 'default-color' => 'EAF6F7', 'default-image' => '%s/images/bg_pattern.png', ) ) ); add_theme_support( 'featured-content', array( 'featured_content_filter' => 'blissful_blog_get_featured_posts', 'description' => __( 'The featured content section displays on the front page above the first post in the content area.', 'blissful-blog' ), 'max_posts' => 10, 'post_types' => array( 'post', 'page' ), ) ); } endif; // blissful_blog_setup add_action( 'after_setup_theme', 'blissful_blog_setup' ); /** * Enqueue scripts and styles */ function blissful_blog_scripts() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_script( 'blissful-blog-small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_home() && blissful_blog_has_multiple_featured_posts() ) { wp_enqueue_style( 'blissful-blog-flex-slider-style', get_template_directory_uri() . '/js/flex-slider/flexslider.css' ); wp_enqueue_script( 'blissful-blog-flex-slider', get_template_directory_uri() . '/js/flex-slider/jquery.flexslider-min.js', array( 'jquery' ) ); wp_enqueue_script( 'blissful-blog-custom-scripts', get_template_directory_uri() . '/js/custom-scripts.js', array( 'blissful-blog-flex-slider' ), '20120206', true ); } if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); if ( is_singular() && wp_attachment_is_image() ) wp_enqueue_script( 'blissful-blog-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); } add_action( 'wp_enqueue_scripts', 'blissful_blog_scripts' ); /** * Register Google Fonts style. */ function blissful_blog_register_fonts() { wp_register_style( 'blissful-blog-googlefonts', "https://fonts.googleapis.com/css?family=Droid+Serif:400,700", array(), '20120821' ); } add_action( 'init', 'blissful_blog_register_fonts' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function blissful_blog_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'blissful_blog_page_menu_args' ); /** * Adds custom classes to the array of body classes. */ function blissful_blog_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author if ( is_multi_author() ) $classes[] = 'group-blog'; return $classes; } add_filter( 'body_class', 'blissful_blog_body_classes' ); /** * Register widgetized area and update sidebar with default widgets */ function blissful_blog_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'blissful-blog' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Left', 'blissful-blog' ), 'id' => 'sidebar-2', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Mid', 'blissful-blog' ), 'id' => 'sidebar-3', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Right', 'blissful-blog' ), 'id' => 'sidebar-4', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'blissful_blog_widgets_init' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Blissful Blog 3.0 */ function blissful_blog_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'blissful-blog' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'blissful_blog_wp_title', 10, 2 ); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * Implement the Custom Header feature. */ require get_template_directory() . '/inc/custom-header.php';