Make WordPress Themes

source: generatepress/1.0/index.php

Last change on this file was 34513, checked in by themedropbox, 12 years ago

New version of GeneratePress - 1.0

File size: 1.3 KB
Line 
1<?php
2/**
3 * The main template file.
4 *
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 * E.g., it puts together the home page when no home.php file exists.
9 * Learn more: http://codex.wordpress.org/Template_Hierarchy
10 *
11 * @package Generate
12 */
13
14get_header(); ?>
15
16        <div id="primary" <?php generate_content_class();?>>
17                <main id="main" class="site-main" itemtype="http://schema.org/Blog" itemscope="itemscope" itemprop="mainContentOfPage" role="main">
18
19                <?php if ( have_posts() ) : ?>
20
21                        <?php /* Start the Loop */ ?>
22                        <?php while ( have_posts() ) : the_post(); ?>
23
24                                <?php
25                                        /* Include the Post-Format-specific template for the content.
26                                         * If you want to override this in a child theme, then include a file
27                                         * called content-___.php (where ___ is the Post Format name) and that will be used instead.
28                                         */
29                                        get_template_part( 'content', get_post_format() );
30                                ?>
31
32                        <?php endwhile; ?>
33
34                        <?php generate_content_nav( 'nav-below' ); ?>
35
36                <?php else : ?>
37
38                        <?php get_template_part( 'no-results', 'index' ); ?>
39
40                <?php endif; ?>
41
42                </main><!-- #main -->
43        </div><!-- #primary -->
44
45<?php 
46do_action('generate_sidebars');
47get_footer();
Note: See TracBrowser for help on using the repository browser.