function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } echo "<ul class=\"widget-list featured-post-widget featured-post\">"; wp_reset_query(); global $wp_query; $old_query = $wp_query; $FeaturedPost_query = new WP_Query(array('post_type' => $instance['post_type'], 'showposts' => $instance['num'], 'featured' => 'yes', 'paged' => 1)); while ($FeaturedPost_query->have_posts()) { $FeaturedPost_query->the_post(); echo "<li class='cf'>"; echo "<a href=\"" . get_permalink() . "\"><div class='featured-post-left'>"; if (has_post_thumbnail()) { the_post_thumbnail(array(84, 84, true)); } else { tabbysplace_featured_placeholder_img(array('echo' => true)); } echo "</div>"; echo "<div class='featured-post-right'><h4>"; echo get_the_title(); echo "</h4>"; if (function_exists('tabbysplace_get_the_excerpt')) { echo "<p class='featured-cont-desktop'>" . tabbysplace_get_the_trimmed_excerpt_by_char(75) . "</p>"; echo "<p class='featured-cont-tablet'>" . tabbysplace_get_the_trimmed_excerpt_by_char(32) . "</p>"; } else { echo "<p>" . get_the_excerpt() . "</p>"; } echo "</div></a>"; echo "</li>"; } wp_reset_query(); $wp_query = $old_query; echo "</ul>"; echo $after_widget; // outputs the content of the widget }
?> "> <div class="author-cat"> <span class="author-name">by <?php echo $author; ?> </span> | <span class="cat-blog-latest"><?php echo $category_list; ?> </span> </div> <span class="recent-title" > <?php the_title(); ?> </span> <p><?php echo tabbysplace_get_the_trimmed_excerpt_by_char(175); ?> </p> <div class="view-more-post"> <div class="icon-foot-print"></div> <span title="View More">View More</span></div> </a> </div> <?php } wp_reset_query(); ?> </div> </div>