function rb_portfolio_loop_content() { if (have_posts()) { add_thickbox(); while (have_posts()) { the_post(); ?> <article <?php post_class(); ?> > <?php rb_portfolio_add_image(); //rb_portfolio_featured_post_image(); the_date('F Y', '<span class="portfolio-date">', '</span>'); genesis_do_post_title(); rb_portfolio_add_authors(); rb_portfolio_display_thickbox_content(); ?> </article> <?php } } }
/** @see WP_Widget::widget -- do not rename this */ function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); $link = $instance['link']; $textarea = wpautop($instance['textarea']); $count = 0; echo $before_widget; if ($title) { echo '<header>'; echo '<h4 class="widget-title widgettitle portfolio-widget-title">'; echo $title; echo '</h4>'; echo '</header>'; } if ($textarea) { echo '<div class="entry-widget_content entry-content portfolio-widget-content">'; echo $textarea; echo '</div>'; } if (have_posts()) { echo '<div class="full-width-content post-type-archive-portfolio">'; add_thickbox(); $args = array('post_type' => 'portfolio', 'posts_per_page' => '4'); $portfolio_query = new WP_Query($args); while ($portfolio_query->have_posts()) { $portfolio_query->the_post(); $add_class = array('one-fourth'); if ($count == 0 || $count == 4) { $add_class[] = 'first'; echo '<div class="clear"></div>'; } ?> <article <?php post_class($add_class); ?> > <?php rb_portfolio_add_image(); // the_date( 'F Y', '<span class="portfolio-date">', '</span>' ); genesis_do_post_title(); // rb_portfolio_add_authors(); rb_portfolio_display_thickbox_content(); ?> </article> <?php $count++; } } wp_reset_query(); echo '<div class="clear"></div>'; echo '</div>'; // .full-width-content.post-type-archive-portfolio echo $after_widget; }