<?php

/**
 * @package WP_Basic_Bootstrap
 * @since WP_Basic_Bootstrap 1.0
 */
if (have_posts() && !is_singular()) {
    $list_layout = get_posts_list_layout();
    $count = 0;
    if (is_sticky_view()) {
        $sticky = get_sticky_query();
        if ($sticky) {
            while (have_posts()) {
                the_post();
                ?>

    <div class="sticky-wrapper">
        <?php 
                get_template_part_hierarchical('post-templates/summary-sticky', get_post_format());
                ?>
    </div>
    <hr class="hidden-print" />

        <?php 
            }
        }
        ?>
    <?php 
        get_not_sticky_query();
        ?>
    <?php 
Example #2
0
<?php

/**
 * @package WP_Basic_Bootstrap
 * @since WP_Basic_Bootstrap 1.0
 */
// single page content
if (is_singular() && have_posts()) {
    while (have_posts()) {
        the_post();
        get_template_part_hierarchical('post-templates/content', get_post_format());
        get_the_pagination();
        if (!is_attachment()) {
            comments_template_hierarchical();
        }
    }
    // objects list
} elseif (have_posts()) {
    get_template_part_hierarchical('partials/layout/posts-list', get_posts_list_layout());
    get_the_pagination();
    // no list to show
} else {
    _e('Sorry, no posts matched your criteria.', 'basicbootstrap');
}