コード例 #1
0
<?php

get_header();
if (have_posts()) {
    theme_archive_title();
    while (have_posts()) {
        the_post();
        get_template_part('templates/archive', get_post_type());
    }
    theme_content_nav();
} else {
    get_template_part('templates/single', '404');
}
get_footer();
コード例 #2
0
 
            <?php 
while (have_posts()) {
    the_post();
    ?>
 
                <?php 
    theme_content_nav('nav-above');
    ?>
 
                <?php 
    get_template_part('content', 'single');
    ?>
 
                <?php 
    theme_content_nav('nav-below');
    ?>
 
                <?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (comments_open() || '0' != get_comments_number()) {
        comments_template('', true);
    }
    ?>
 
            <?php 
}
// end of the loop.
?>
 
            </div><!-- #content .site-content -->