<?php locate_template('templates/header.php', true, true); echo '<h2 class="uk-article-title">'; basey_title(); echo '</h2>'; // start loop while (have_posts()) { the_post(); // determine if template is available $template_available = locate_template('templates/teaser/' . get_post_type() . '.php') ? get_post_type() : false; switch (get_post_type()) { case $template_available: locate_template('templates/teaser/' . get_post_type() . '.php', true, false); break; default: locate_template('templates/teaser/default.php', true, false); break; } } // display navigation to next/previous pages when applicable basey_pagination(); // if no posts if (!have_posts() || get_search_query() == ' ') { basey_no_results(); } locate_template('templates/footer.php', true, true);
<hr class="uk-article-divider"> <section id="comments"> <h3><?php printf(_n('One Response to “%2$s”', '%1$s Responses to “%2$s”', get_comments_number(), 'basey'), number_format_i18n(get_comments_number()), get_the_title()); ?> </h3> <ul class="uk-comment-list"> <?php wp_list_comments(array('walker' => new Basey_Walker_Comment())); ?> </ul> <?php if (get_comment_pages_count() > 1 && get_option('page_comments')) { basey_pagination('comments'); } ?> <?php if (!comments_open() && !is_page() && post_type_supports(get_post_type(), 'comments')) { ?> <div class="uk-alert uk-alert-warning"> <?php _e('Comments are closed.', 'basey'); ?> </div> <?php } ?> </section><!-- /#comments -->