intval($excellent_settings['excellent_category_slider_number']), 'post_type' => array( 'post' ) , 'category__in' => intval($excellent_settings['excellent_category_slider']), )); if($query->have_posts() && !empty($excellent_settings['excellent_category_slider'])){ $excellent_category_sliders_display = ''; $excellent_category_sliders_display .= '
'; echo $excellent_category_sliders_display; } } /*************************** ENQUEING STYLES AND SCRIPTS ****************************************/ function excellent_scripts() { $excellent_settings = excellent_get_theme_options(); wp_enqueue_script('excellent-main', get_template_directory_uri().'/js/excellent-main.js', array('jquery'), false, true); $excellent_stick_menu = $excellent_settings['excellent_stick_menu']; if($excellent_stick_menu != 1): wp_enqueue_script('jquery-sticky', get_template_directory_uri().'/assets/sticky/jquery.sticky.min.js', array('jquery'), false, true); wp_enqueue_script('excellent-sticky-settings', get_template_directory_uri().'/assets/sticky/sticky-settings.js', array('jquery'), false, true); endif; // Load the html5 shiv. wp_enqueue_script( 'html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' ); wp_script_add_data( 'html5', 'conditional', 'lt IE 9' ); wp_enqueue_style( 'excellent-style', get_stylesheet_uri() ); wp_enqueue_style('font-awesome', get_template_directory_uri().'/assets/font-awesome/css/font-awesome.min.css'); wp_enqueue_script('jquery-flexslider', get_template_directory_uri().'/js/jquery.flexslider.js', array('jquery'), false, true); wp_enqueue_script('excellent-slider', get_template_directory_uri().'/js/flexslider-setting.js', array('jquery-flexslider'), false, true); if($excellent_settings['excellent_scrollreveal_effect'] ==0){ wp_enqueue_style('excellent-animate', get_template_directory_uri().'/assets/wow/css/animate.min.css'); wp_enqueue_script('wow', get_template_directory_uri().'/assets/wow/js/wow.min.js', array('jquery'), false, true); wp_enqueue_script('wow-settings', get_template_directory_uri().'/assets/wow/js/wow-settings.js', array('jquery'), false, true); } wp_enqueue_script('excellent-navigation', get_template_directory_uri().'/js/navigation.js', array('jquery'), false, true); $excellent_animation_effect = esc_attr($excellent_settings['excellent_animation_effect']); $excellent_slideshowSpeed = absint($excellent_settings['excellent_slideshowSpeed'])*1000; // Set the speed of the slideshow cycling, in milliseconds $excellent_animationSpeed = absint($excellent_settings['excellent_animationSpeed'])*100; //Set the speed of animations, in milliseconds $excellent_direction = esc_attr($excellent_settings['excellent_direction']); wp_localize_script( 'excellent-slider', 'excellent_slider_value', array( 'excellent_animation_effect' => $excellent_animation_effect, 'excellent_slideshowSpeed' => $excellent_slideshowSpeed, 'excellent_animationSpeed' => $excellent_animationSpeed, 'excellent_direction' => $excellent_direction, ) ); wp_enqueue_script( 'excellent-slider' ); if( $excellent_settings['excellent_responsive'] == 'on' ) { wp_enqueue_style('excellent-responsive', get_template_directory_uri().'/css/responsive.css'); } /********* Adding Multiple Fonts ********************/ $excellent_googlefont = array(); array_push( $excellent_googlefont, 'Roboto:300,400,400i,700'); array_push( $excellent_googlefont, 'Lora:400,400i'); $excellent_googlefonts = implode("|", $excellent_googlefont); wp_register_style( 'excellent_google_fonts', '//fonts.googleapis.com/css?family='.$excellent_googlefonts); wp_enqueue_style( 'excellent_google_fonts' ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } /* Custom Css */ $excellent_internal_css=''; if ($excellent_settings['excellent_slider_content_bg_color'] =='on'){ $excellent_internal_css .= '/* Slider Content With background color */ .slider-content { background: rgba(255, 255, 255, 0.8) padding-box; border: 7px solid rgba(255, 255, 255, 0.4); padding: 20px 20px 25px; }'; } if ($excellent_settings['excellent_site_sticky_hide_social_icon'] =='on'){ $excellent_internal_css .= '/* Show Site Title and Hide Social Icon on Sticky Header */ .is-sticky #sticky-header #site-branding { display: block; float: left; padding: 0; } .is-sticky .header-social-block { display: none; } .is-sticky .main-navigation { float: right; }'; } if ($excellent_settings['excellent_logo_high_resolution'] !=0){ $excellent_internal_css .= '/* Logo for high resolution screen(Use 2X size image) */ .custom-logo-link .custom-logo { width: 50%; } @media only screen and (max-width: 767px) { .custom-logo-link .custom-logo { width: 60%; } } @media only screen and (max-width: 480px) { .custom-logo-link .custom-logo { width: 80%; } }'; } if ($excellent_settings['excellent_small_feature_single_post'] !=0){ $excellent_internal_css .= '/* Display small feature image in single post */ .single-featured-image-header { height: 400px; margin: 50px auto 0; overflow: hidden; width: 1170px; } .single-featured-image-header img { position: relative; top: 50%; transform: translateY(-50%); width: 100%; } @media only screen and (max-width: 1300px) { .single-featured-image-header { width: 970px; } .boxed-layout .single-featured-image-header, .boxed-layout-small .single-featured-image-header { max-width: 904px; } } @media only screen and (max-width: 1023px) { .single-featured-image-header { height: 100%; width: 708px; } .boxed-layout .single-featured-image-header, .boxed-layout-small .single-featured-image-header { width: 668px; } .single-featured-image-header img { top: inherit; transform: inherit; } } @media only screen and (max-width: 767px) { .single-featured-image-header { width: 460px; } .boxed-layout .single-featured-image-header, .boxed-layout-small .single-featured-image-header { width: 440px; } } @media only screen and (max-width: 480px) { .single-featured-image-header { width: 300px; } .boxed-layout .single-featured-image-header, .boxed-layout-small .single-featured-image-header { width: 280px; } } @media only screen and (max-width: 319px) { .single-featured-image-header, .boxed-layout .single-featured-image-header, .boxed-layout-small .single-featured-image-header { width: 96%; } }'; } wp_add_inline_style( 'excellent-style', wp_strip_all_tags($excellent_internal_css) ); } add_action( 'wp_enqueue_scripts', 'excellent_scripts' );