if (count(hero_posts()) === 1) { echo 'class="single"'; } ?> > <article> <?php $firstpost = hero_posts()[0]; hero_content($firstpost, true); ?> </article> </div> <div> <?php if (count(hero_posts() > 1)) { foreach (hero_posts() as $key => $post) { if ($key === 0) { continue; } ?> <article> <?php hero_content($post, true); ?> </article> <?php } } wp_reset_postdata(); ?> </div>
<section id="primary" class="main content"> <?php if (!is_singular()) { $query['post__not_in'] = hero_posts('ids'); if (is_tax()) { $query['post_type'] = 'page'; } // if(is_front_page() || is_home()){ // } $args = array_merge($wp_query->query_vars, $query); query_posts($args); } if (have_posts()) { while (have_posts()) { the_post(); ?> <article id="post-<?php the_ID(); ?> " <?php post_class(layout_class()); ?> > <?php get_template_part('content'); ?> </article> <?php } ?> <?php