?> </div> <?php } ?> </div> <a href="<?php echo esc_url(get_permalink()); ?> " class="vce-featured-header-background"></a> </div> <?php if ($fimage = vce_featured_image('vce-fa-grid')) { ?> <a href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> "> <?php echo $fimage; ?> </a> <?php } ?>
<li> <?php if ($fimage = vce_featured_image('vce-lay-b')) { ?> <a class="mega-menu-img" href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> "> <?php echo $fimage; ?> <?php if ($icon = vce_post_format_icon('lay_c')) { ?> <span class="vce-format-icon"> <i class="fa <?php echo $icon; ?> "></i> </span> <?php } ?> </a> <?php } ?>
</div> <?php if (vce_get_option('show_fimg_cap') && ($caption = get_post(get_post_thumbnail_id())->post_excerpt)) { ?> <div class="vce-photo-caption"><?php echo $caption; ?> </div> <?php } ?> <div class="vce-featured-header-background"></div> </div> <?php if ($fimage = vce_featured_image('vce-fa-full')) { ?> <?php echo $fimage; ?> <?php } ?> </div> <?php }
?> </p></div> <?php } ?> </div> <div class="vce-featured-header-background"></div> </div> <?php global $vce_sidebar_opts; $img_size = $vce_sidebar_opts['use_sidebar'] == 'none' ? 'vce-lay-a-nosid' : 'vce-lay-a'; ?> <?php if ($fimage = vce_featured_image($img_size)) { ?> <div class="meta-image"> <a href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> "> <?php echo $fimage; ?> <?php if ($icon = vce_post_format_icon('lay_g')) { ?>
function widget($args, $instance) { extract($args); $instance = wp_parse_args((array) $instance, $this->defaults); echo $before_widget; $title = apply_filters('widget_title', $instance['title']); if (!empty($title)) { echo $before_title . $title . $after_title; } $q_args = array('post_type' => 'post', 'posts_per_page' => $instance['numposts'], 'ignore_sticky_posts' => 1, 'orderby' => $instance['orderby']); if (!empty($instance['manual']) && !empty($instance['manual'][0])) { $q_args['posts_per_page'] = absint(count($instance['manual'])); $q_args['orderby'] = 'post__in'; $q_args['post__in'] = $instance['manual']; $q_args['post_type'] = array_keys(get_post_types(array('public' => true))); //support all existing public post types } else { if (!empty($instance['auto_detect']) && is_single()) { $cats = get_the_category(); if (!empty($cats)) { foreach ($cats as $k => $cat) { $q_args['category__in'][] = $cat->term_id; } } } else { if (!empty($instance['category'])) { $q_args['category__in'] = is_array($instance['category']) ? $instance['category'] : array($instance['category']); } } if (!empty($instance['tag'])) { $q_args['tag_slug__in'] = explode(',', $instance['tag']); } if ($instance['orderby'] == 'views' && function_exists('ev_get_meta_key')) { $q_args['orderby'] = 'meta_value_num'; $q_args['meta_key'] = ev_get_meta_key(); } if ($instance['orderby'] == 'title') { $q_args['order'] = 'ASC'; } if (!empty($instance['date_limit'])) { $q_args['date_query'] = array('after' => date('Y-m-d', vce_calculate_time_diff($instance['date_limit']))); } } $vce_posts = new WP_Query($q_args); $title_limit = isset($instance['title_limit']) && !empty($instance['title_limit']) ? $instance['title_limit'] : false; $title_more = isset($instance['title_more']) ? $instance['title_more'] : '...'; $img_size = $instance['style'] == 'vce-post-list' ? 'vce-lay-d' : 'vce-fa-grid'; if ($vce_posts->have_posts()) { ?> <?php if ($instance['style'] == 'vce-post-slider' && $vce_posts->post_count == 1) { $instance['style'] = 'vce-post-big'; } ?> <ul class="<?php echo $instance['style']; ?> "> <?php while ($vce_posts->have_posts()) { $vce_posts->the_post(); ?> <li> <?php $p_title = $title_limit ? vce_trim_chars(strip_tags(get_the_title()), $title_limit, $title_more) : get_the_title(); ?> <a href="<?php echo esc_url(get_permalink()); ?> " class="featured_image_sidebar" title="<?php echo esc_attr(get_the_title()); ?> "><span class="vce-post-img"><?php echo vce_featured_image($img_size); ?> </span></a> <div class="vce-posts-wrap"> <?php if (!empty($instance['cat_link'])) { ?> <span class="meta-category"><?php echo vce_get_category(); ?> </span> <?php } ?> <a href="<?php echo esc_url(get_permalink()); ?> " title="<?php echo esc_attr(get_the_title()); ?> " class="vce-post-link"><?php echo $p_title; ?> </a> <?php if (!empty($instance['meta']) && ($meta = vce_get_meta_data('', $instance['meta']))) { ?> <div class="entry-meta"><?php echo $meta; ?> </div> <?php } ?> </div> </li> <?php } ?> </ul> <?php } ?> <?php wp_reset_postdata(); ?> <?php echo $after_widget; }
?> <?php $img = vce_featured_image('vce-lay-b', $prev->ID); ?> <div class="vce-prev-link"> <?php previous_post_link('%link', '<span class="img-wrp">' . $img . '<span class="vce-pn-ico"><i class="fa fa fa-chevron-left"></i></span></span><span class="vce-prev-next-link">%title</span>', $in_same_cat); ?> </div> <?php } ?> <?php if ($next) { ?> <?php $img = vce_featured_image('vce-lay-b', $next->ID); ?> <div class="vce-next-link"> <?php next_post_link('%link', '<span class="img-wrp">' . $img . '<span class="vce-pn-ico"><i class="fa fa fa-chevron-right"></i></span></span><span class="vce-prev-next-link">%title</span>', $in_same_cat); ?> </div> <?php } ?> </nav>