-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
51 lines (27 loc) · 1.65 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php get_header(); // Loads the header.php template. ?>
<main <?php hybrid_attr( 'content' ); ?>>
<?php hybrid_get_menu( 'breadcrumbs' ); // Loads the menu/breadcrumbs.php template. ?>
<?php if ( ! is_front_page() && hybrid_is_plural() ) : // If viewing a multi-post page ?>
<header <?php hybrid_attr( 'archive-header' ); ?>>
<h1 <?php hybrid_attr( 'archive-title' ); ?>><?php the_archive_title(); ?></h1>
<?php if ( ! is_paged() && $desc = get_the_archive_description() ) : // Check if we're on page/1. ?>
<div <?php hybrid_attr( 'archive-description' ); ?>>
<?php echo $desc; ?>
</div><!-- .archive-description -->
<?php endif; // End paged check. ?>
</header><!-- .archive-header -->
<?php endif; // End check for multi-post page. ?>
<?php if ( have_posts() ) : // Checks if any posts were found. ?>
<?php while ( have_posts() ) : // Begins the loop through found posts. ?>
<?php the_post(); // Loads the post data. ?>
<?php hybrid_get_content_template(); // Loads the content/*.php template. ?>
<?php if ( is_singular() ) : // If viewing a single post/page/CPT. ?>
<?php comments_template( '', true ); // Loads the comments.php template. ?>
<?php endif; // End check for single post. ?>
<?php endwhile; // End found posts loop. ?>
<?php locate_template( array( 'menu/loop-nav.php' ), true ); // Loads the menu/loop-nav.php template. ?>
<?php else : // If no posts were found. ?>
<?php locate_template( array( 'content/error.php' ), true ); // Loads the content/error.php template. ?>
<?php endif; // End check for posts. ?>
</main><!-- #content -->
<?php get_footer(); // Loads the footer.php template. ?>