3 * The main template file.
5 * This is the most generic template file in a WordPress theme
6 * and one of the two required files for a theme (the other being style.css).
7 * It is used to display a page when nothing more specific matches a query.
8 * For example, it puts together the home page when no home.php file exists.
10 * Learn more: http://codex.wordpress.org/Template_Hierarchy
13 * @subpackage Twenty_Twelve
14 * @since Twenty Twelve 1.0
19 <div id="primary" class="site-content">
20 <div id="content" role="main">
21 <?php if ( have_posts() ) : ?>
23 <?php /* Start the Loop */ ?>
24 <?php while ( have_posts() ) : the_post(); ?>
25 <?php get_template_part( 'content', get_post_format() ); ?>
28 <?php twentytwelve_content_nav( 'nav-below' ); ?>
32 <article id="post-0" class="post no-results not-found">
34 <?php if ( current_user_can( 'edit_posts' ) ) :
35 // Show a different message to a logged-in user who can add posts.
37 <header class="entry-header">
38 <h1 class="entry-title"><?php _e( 'No posts to display', 'twentytwelve' ); ?></h1>
41 <div class="entry-content">
42 <p><?php printf( __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwelve' ), admin_url( 'post-new.php' ) ); ?></p>
43 </div><!-- .entry-content -->
46 // Show the default message to everyone else.
48 <header class="entry-header">
49 <h1 class="entry-title"><?php _e( 'Nothing Found', 'twentytwelve' ); ?></h1>
52 <div class="entry-content">
53 <p><?php _e( 'Apologies, but no results were found. Perhaps searching will help find a related post.', 'twentytwelve' ); ?></p>
54 <?php get_search_form(); ?>
55 </div><!-- .entry-content -->
56 <?php endif; // end current_user_can() check ?>
58 </article><!-- #post-0 -->
60 <?php endif; // end have_posts() check ?>
62 </div><!-- #content -->
63 </div><!-- #primary -->
65 <?php get_sidebar(); ?>
66 <?php get_footer(); ?>