term_id ) || $object->term_id == $primary_category ) :
array_push( $categories, $object->term_id );
endif;
endforeach;
/* Now that we have our featured categories, let's display their posts in a nice
/* news-like block. We're listing categories in alphabetical order and
/* will display up to 6 posts in each block. If a post has already appeared in the slider, it WON'T
/* be duplicated here. */
foreach ( $categories as $cat ) :
$loop = new WP_Query( array( 'category__in' => $cat, 'posts_per_page' => 6, 'post__not_in' => $do_not_duplicate ) );
if ( $loop->have_posts() ) :
?>
1 )
echo ''; // If there is more than one post, close the list after the loop. ?>
10, 'post__not_in' => $do_not_duplicate ) ); ?>
have_posts() ) : ?>
name; ?>
have_posts() ) : $loop->the_post(); $do_not_duplicate[] = get_the_ID(); /* Let's show a thumbnail, larger title, and excerpt for the /* first post in each block. */ if ( ++$i == 1 ) : ?> '; // If second post, open the list. endif; ?>
have_posts() ) : $loop->the_post(); ?>