echo $cs_node->slider_element_size; ?> column banner"> <?php if ($cs_node->slider_header_title != '' && $cs_node->slider_view != "header") { ?> <header class="heading"> <h2 class="headding-color section-title"><?php echo $cs_node->slider_header_title; ?> </h2> </header> <?php } ?> <article> <?php if (!empty($cs_node->slider)) { // slider slug to id start $args = array('name' => (string) $cs_node->slider, 'post_type' => 'cs_slider', 'post_status' => 'publish', 'showposts' => 1); $get_posts = get_posts($args); if ($get_posts) { $slider_id = (int) $get_posts[0]->ID; cs_flex_slider('980', '408', $slider_id); } } else { echo "Please Select Slider"; } ?> </article> </div>
function cs_get_home_slider() { global $cs_theme_option; if ($cs_theme_option['show_slider'] == "on") { ?> <div id="banner"> <?php if (isset($cs_theme_option['slider_type']) and $cs_theme_option['slider_type'] == "flex") { $width = 1600; $height = 610; $slider_slug = $cs_theme_option['slider_name']; if ($slider_slug != '') { $args = array('name' => $slider_slug, 'post_type' => 'cs_slider', 'post_status' => 'publish', 'showposts' => 1); $get_posts = get_posts($args); if ($get_posts) { $slider_id = $get_posts[0]->ID; cs_flex_slider($width, $height, $slider_id); } else { $slider_id = ''; echo '<div class="box-small no-results-found heading-color"> <h5>'; _e("No results found.", 'WeStand'); echo ' </h5></div>'; } } } else { if (isset($cs_theme_option['slider_type']) and $cs_theme_option['slider_type'] == "post_slider" && $cs_theme_option['cs_slider_blog_cat']) { if (isset($cs_theme_option['cs_slider_blog_cat']) && $cs_theme_option['cs_slider_blog_cat'] != '') { $cs_slider_blog_cat = $cs_theme_option['cs_slider_blog_cat']; if (isset($cs_theme_option['slider_no_posts']) && $cs_theme_option['slider_no_posts'] != '') { $blog_no_posts = $cs_theme_option['slider_no_posts']; } else { $blog_no_posts = 5; } cs_post_slider($cs_theme_option['cs_slider_blog_cat'], $blog_no_posts); } } else { if (isset($cs_theme_option['slider_type']) and $cs_theme_option['slider_type'] == "custom") { echo do_shortcode(htmlspecialchars_decode($cs_theme_option['slider_id'])); } } } ?> </div> <?php } }
cs_breadcrumbs(); ?> </div> </div> </div> <div class="clear"></div> <?php } else { if (isset($header_banner_style) && $header_banner_style == 'flex_slider') { if (!empty($header_banner_flex_slider)) { // slider slug to id start $args = array('name' => (string) $header_banner_flex_slider, 'post_type' => 'cs_slider', 'post_status' => 'publish', 'showposts' => 1); $get_posts = get_posts($args); if ($get_posts) { $slider_id = $get_posts[0]->ID; cs_flex_slider('1600', '610', (int) $slider_id); } } else { echo "Please Select Slider"; } } else { if (isset($header_banner_style) && $header_banner_style == 'custom_slider') { if (isset($custom_slider_id) && $custom_slider_id != '') { echo do_shortcode(htmlspecialchars_decode($custom_slider_id)); } else { echo "Please Enter Shortcode"; } } } } /* Header Slider and Map Code start */
$no_image = ''; $width = 716; $height = 393; $image_url = cs_get_post_img_src($post->ID, $width, $height); $image_url_full = ''; } ?> <!-- Blog Post Start --> <article <?php post_class(fnc_post_type($post_view, $image_url)); ?> > <?php echo '<figure>'; if ($post_view == "Slider" and $post_slider != '') { cs_flex_slider($width, $height, $post_slider); } elseif ($post_view == "Single Image") { if ($image_url != '') { echo '<a href="' . get_permalink() . '" ><img src="' . $image_url . '" alt="" ></a>'; } } elseif ($post_view == "Video") { $url = parse_url($post_video); if ($url['host'] == $_SERVER["SERVER_NAME"]) { $poster_url = ''; if ($post_featured_image == 'on') { $poster_url = $image_url; } if ($image_url != '') { echo "<a href='" . get_permalink() . "'><img src=" . $image_url . " alt='' ></a>"; } ?>