Skip to content
Newer
Older
100644 57 lines (42 sloc) 1.29 KB
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
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.
de9c988 @PJ-Finlay Updated documentation in comments at the top of files.
PJ-Finlay authored Jul 1, 2015
9 *
10 * @link https://codex.wordpress.org/Template_Hierarchy
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
11 *
12 * @package _s
13 */
14
15 get_header(); ?>
16
c4f2aa3 @obenland _s: Formatting changes:
obenland authored Mar 4, 2013
17 <div id="primary" class="content-area">
810e499 @obenland _s: Use `<main>` element for main content.
obenland authored Jul 30, 2013
18 <main id="main" class="site-main" role="main">
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
19
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
20 <?php
21 if ( have_posts() ) :
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
22
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
23 if ( is_home() && ! is_front_page() ) : ?>
955cd14 @mor10 Added condition to include a hidden H1 on index when a page is set to…
mor10 authored Jul 2, 2015
24 <header>
25 <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
26 </header>
27
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
28 <?php
29 endif;
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
30
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
31 /* Start the Loop */
32 while ( have_posts() ) : the_post();
1755249 @fklein-lu Fix Codesniffer errors.
fklein-lu authored May 27, 2015
33
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
34 /*
35 * Include the Post-Format-specific template for the content.
36 * If you want to override this in a child theme, then include a file
37 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
38 */
39 get_template_part( 'template-parts/content', get_post_format() );
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
40
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
41 endwhile;
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
42
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
43 the_posts_navigation();
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
44
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
45 else :
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
46
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
47 get_template_part( 'template-parts/content', 'none' );
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
48
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
49 endif; ?>
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
50
810e499 @obenland _s: Use `<main>` element for main content.
obenland authored Jul 30, 2013
51 </main><!-- #main -->
c4f2aa3 @obenland _s: Formatting changes:
obenland authored Mar 5, 2013
52 </div><!-- #primary -->
edfeccc @ianstewart _s: initial fork of Toolbox
ianstewart authored Jan 7, 2012
53
8470f55 @jrfnl Avoid going in and out of PHP unnecessarily.
jrfnl authored Nov 11, 2015
54 <?php
55 get_sidebar();
56 get_footer();
Something went wrong with that request. Please try again.