Example #1
0
<?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);
Example #2
0
 	<hr class="uk-article-divider">
	<section id="comments">
		<h3><?php 
    printf(_n('One Response to &ldquo;%2$s&rdquo;', '%1$s Responses to &ldquo;%2$s&rdquo;', 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 -->