?>
    <?php 
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        ?>
      <?php 
        if ($stack != 'ethos') {
            ?>
        <?php 
            x_get_view($stack, 'content', 'portfolio');
            ?>
      <?php 
        } else {
            ?>
        <?php 
            x_ethos_entry_cover('main-content');
            ?>
      <?php 
        }
        ?>
    <?php 
    }
    ?>
  <?php 
}
?>

</div>

<?php 
pagenavi();
    <?php 
    $wp_query = new WP_Query($args);
    ?>

    <?php 
    if ($wp_query->have_posts()) {
        ?>
      <?php 
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            ?>

        <li class="x-post-carousel-item">
          <?php 
            x_ethos_entry_cover('post-carousel');
            ?>
        </li>

      <?php 
        }
        ?>
    <?php 
    }
    ?>

    <?php 
    wp_reset_query();
    ?>

    <script>