false ) ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for custom logo. */ add_theme_support( 'custom-logo', array( 'flex-height' => true, 'flex-width' => true, ) ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 785, 520); add_image_size( 'blog-lite-block', 370, 275, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => esc_html__( 'Primary', 'blog-lite' ), 'top-bar' => esc_html__( 'Top Bar', 'blog-lite' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * See https://developer.wordpress.org/themes/functionality/post-formats/ */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); // Set up the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'blog_lite_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); } endif; add_action( 'after_setup_theme', 'blog_lite_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function blog_lite_content_width() { $GLOBALS['content_width'] = apply_filters( 'blog_lite_content_width', 785 ); } add_action( 'after_setup_theme', 'blog_lite_content_width', 0 ); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function blog_lite_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'blog-lite' ), 'id' => 'sidebar-1', 'description' => esc_html__( 'Add widgets here.', 'blog-lite' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<header class="entry-header border-bottom"><h3 class="widget-title">', 'after_title' => '</header></h3>', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer: One', 'blog-lite' ), 'id' => 'footer-1', 'description' => esc_html__( 'Add widgets here.', 'blog-lite' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<header class="entry-header border-bottom"><h3 class="widget-title">', 'after_title' => '</header></h3>', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer: Two', 'blog-lite' ), 'id' => 'footer-2', 'description' => esc_html__( 'Add widgets here.', 'blog-lite' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<header class="entry-header border-bottom"><h3 class="widget-title">', 'after_title' => '</header></h3>', ) ); register_sidebar( array( 'name' => esc_html__( 'Footer: Three', 'blog-lite' ), 'id' => 'footer-3', 'description' => esc_html__( 'Add widgets here.', 'blog-lite' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<header class="entry-header border-bottom"><h3 class="widget-title">', 'after_title' => '</header></h3>', ) ); } add_action( 'widgets_init', 'blog_lite_widgets_init' ); /** * Enqueue scripts and styles. */ function blog_lite_scripts() { $theme_options = blog_lite_theme_options(); wp_enqueue_style( 'blog-lite-grid', get_template_directory_uri() . '/assets/css/grid.css' ); wp_enqueue_style( 'blog-lite-style', get_stylesheet_uri() ); wp_enqueue_style( 'blog-lite-white', get_template_directory_uri() . '/assets/css/white.css' ); wp_enqueue_style( 'blog-lite-meanmenu', get_template_directory_uri() . '/assets/css/meanmenu.css' ); wp_enqueue_style( 'blog-lite-custom', get_template_directory_uri() . '/assets/css/custom.css' ); wp_enqueue_style( 'blog-lite-responsive', get_template_directory_uri() . '/assets/css/responsive.css' ); wp_enqueue_style( 'blog-lite-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css' ); $raleway = array( 'family' => 'Raleway:400,300,500,700,800,900,500italic,600,700italic,100,200', ); wp_register_style( 'raleway-fonts', add_query_arg( $raleway, "//fonts.googleapis.com/css" ), array(), null ); wp_enqueue_style( 'raleway-fonts' ); $oswald = array( 'family' => 'Oswald:400,700,300', ); wp_register_style( 'oswald-fonts', add_query_arg( $oswald, "//fonts.googleapis.com/css" ), array(), null ); wp_enqueue_style( 'oswald-fonts' ); wp_enqueue_script( 'blog-lite-meanmenu', get_template_directory_uri() . '/assets/js/jquery.meanmenu.js', array('jquery'), '20151215', true ); wp_enqueue_script( 'blog-lite-custom', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), '20151215', true ); wp_enqueue_script( 'blog-lite-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array('jquery'), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } /*for slider*/ if( 'slider' == $theme_options['main_slider_type'] && ( is_home() || is_front_page() ) ){ wp_enqueue_style( 'blog-lite-owl', get_template_directory_uri() . '/assets/owl-carousel/lib/owl.carousel.css' ); wp_enqueue_script( 'blog-lite-owl', get_template_directory_uri() . '/assets/owl-carousel/lib/owl.carousel.min.js', array('jquery'), '20151215', true ); } } add_action( 'wp_enqueue_scripts', 'blog_lite_scripts' ); /** * Load Blog Lite functions. */ require get_template_directory() . '/rigorous-themes/blog-lite-functions.php';