__( 'Primary Menu', 'elif-lite' ), 'mobile-menu' => __( 'Mobile Menu', 'elif-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', ) ); } } add_action( 'after_setup_theme', 'elif_setup' ); /*-----------------------------------------------------------------------------------*/ /* Theme PHP scripts and libraries /*-----------------------------------------------------------------------------------*/ require_once ( get_template_directory() . '/functions/defaults.php' ); require_once ( get_template_directory() . '/functions/commons.php' ); require_once ( get_template_directory() . '/inc/custom-menu-walker.php' ); require_once ( get_template_directory() . '/inc/customizer/customizer.php'); /*-----------------------------------------------------------------------------------*/ /* Set the content width based on the theme's design and stylesheet. /*-----------------------------------------------------------------------------------*/ if ( ! isset( $content_width ) ) { $content_width = ELIF_CONTENT_WIDTH; /* in Pixels */ } /*-----------------------------------------------------------------------------------*/ /* Register Sidebar & Widget-areas /*-----------------------------------------------------------------------------------*/ if ( !function_exists( 'elif_widgets_init' ) ) { function elif_widgets_init() { /* * Register Sidebar & Widget-areas * @since 1.0.0 */ register_sidebar( array( 'name' => __( 'Main Sidebar', 'elif-lite' ), 'id' => 'main-sidebar', 'description' => __( 'Theme\'s main sidebar.', 'elif-lite' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'elif_widgets_init' ); /*-----------------------------------------------------------------------------------*/ /* Enqueue scripts and styles. /*-----------------------------------------------------------------------------------*/ if ( !function_exists( 'elif_scripts' ) ) { function elif_scripts() { /* * Enqueue scripts and styles. * @since 1.0.0 */ // Load jQuery wp_enqueue_script( 'jquery' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } // Load Fonts wp_enqueue_style( 'elif-fonts', 'https://fonts.googleapis.com/css?family=Lato:400,400i,700|Playfair+Display', false, null, 'all' ); // Load Bootstrap JS wp_enqueue_script( 'elif-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js' ); // Load Masonry JS wp_enqueue_script( 'elif-masonry', get_template_directory_uri() . '/js/masonry.min.js', array( 'jquery' ) ); // Load Slidebars JS wp_enqueue_script( 'elif-slidebars', get_template_directory_uri() . '/js/slidebars.min.js', array( 'jquery' ) ); // Load Custom Scripts wp_enqueue_script( 'elif-scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ), '1.0.0', true ); wp_localize_script( 'elif-scripts', 'elifScripts', array( 'menuside' => elif_mobile_menu_side() ) ); // Load Bootstrap CSS wp_enqueue_style( 'elif-bootstrap', get_template_directory_uri().'/css/bootstrap.min.css' ); // Loading FontAwesome wp_enqueue_style( 'elif-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', null, '4.7.0' ); // Load the Stylesheet wp_enqueue_style( 'elif-stylesheet', get_stylesheet_uri() ); } } add_action( 'wp_enqueue_scripts', 'elif_scripts' ); /*-----------------------------------------------------------------------------------*/ /* Add Post Thumbnail Support /*-----------------------------------------------------------------------------------*/ if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); add_image_size( 'big', 770, 9999, true ); // Big thumb add_image_size( 'tiny', 270, 150, true ); // Tiny thumb add_image_size( 'square', 120, 120, true ); // Square thumb } /*-----------------------------------------------------------------------------------*/ /* Filters & Hooks /*-----------------------------------------------------------------------------------*/ if ( !function_exists( 'elif_custom_excerpt_length' ) ) { function elif_custom_excerpt_length( $length ) { /* * Change Excerpt length to 200 * @param int * * @return int * @since 1.0.0 */ return 200; } } add_filter( 'excerpt_length', 'elif_custom_excerpt_length', 999 ); // Initialize Masonry if ( !function_exists( 'elif_initialize_masonry' ) ) { function elif_initialize_masonry() { /* * Initialize Masonry * @since 1.0.0 */ $data = array(); $theme_layout = get_theme_mod( 'theme_layout', ELIF_THEME_LAYOUT ); $sidebar_layout = get_theme_mod( 'sidebar_layout', ELIF_SIDEBAR_LAYOUT ); if ( $sidebar_layout == 'right' && $theme_layout == 'simple' ) { $data['originLeft'] = 'false'; } ?>
0 && intval( $related_posts_number ) <= 6 ) && ( $related_posts_query == 'tags' || $related_posts_query == 'categories' ) ) { global $post; $orig_post = $post; $args = array(); if ( $related_posts_query == 'tags' ) { $tags = wp_get_post_tags( $post->ID ); $tag_ids = array(); foreach( $tags as $individual_tag ) $tag_ids[] = $individual_tag->term_id; $args = array( 'tag__in' => $tag_ids, 'post__not_in' => array( $post->ID ), 'posts_per_page' => $related_posts_number, // Number of related posts. 'ignore_sticky_posts' => 1, 'orderby' => 'rand', // Randomize the posts. ); } else if ( $related_posts_query == 'categories' ) { $categories = get_the_category($post->ID); $category_ids = array(); foreach( $categories as $individual_category ) $category_ids[] = $individual_category->term_id; $args = array( 'category__in' => $category_ids, 'post__not_in' => array( $post->ID ), 'posts_per_page' => $related_posts_number, 'ignore_sticky_posts' => 1, 'orderby' => 'rand', ); } $my_query = new wp_query( $args ); if( $my_query->have_posts() ) { ?>

  • id="li-comment-">
    comment_author_email, 80 ); ?>