Repository navigation
Expand file tree
/
Copy pathindex.php
More file actions
111 lines (79 loc) · 3.56 KB
/
Copy pathindex.php
File metadata and controls
111 lines (79 loc) · 3.56 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
get_template_part( 'header' ); ?>
<?php get_template_part( 'template-parts/header/header-basic' ); ?>
<div id="main">
<div class="inner">
<?php
$show_sidebar = hovercraft_should_show_sidebar();
$hovercraft_primary_width = get_theme_mod( 'hovercraft_primary_width', 'wide' );
?>
<?php if ( $show_sidebar ) : ?>
<div id="primary">
<?php else : ?>
<?php if ( $hovercraft_primary_width === 'narrow_centered' ) : ?>
<div id="primary-center">
<?php elseif ( $hovercraft_primary_width === 'wide' ) : ?>
<div id="primary-wide">
<?php endif; // end primary width ?>
<?php endif; // end sidebar ?>
<div id="content-wrapper">
<div id="content-padded">
<?php get_template_part( 'template-parts/misc/breadcrumbs' ); ?>
<?php if ( is_home() ) : ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-tease-archive' ); ?>>
<?php
$hovercraft_primary_width = get_theme_mod( 'hovercraft_primary_width', 'wide' );
if ( $hovercraft_primary_width === 'wide' ) {
get_template_part( 'template-parts/content/featured-image-archive-large' );
} else {
get_template_part( 'template-parts/content/featured-image-archive' );
}
?>
<h4 class="entry-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo esc_html( get_the_title() ); ?></a></h4>
<?php get_template_part( 'template-parts/content/byline-archive' ); ?>
<div class="entry-summary post-excerpt-archive"><?php the_excerpt(); ?></div>
</article><!-- post-tease-archive -->
<?php endwhile; // end home posts ?>
<?php else : ?>
<p><?php esc_html_e( 'No posts found.', 'hovercraft' ); ?></p>
<?php endif; // end the loop ?>
<?php else : ?>
<h1 class="archive-title"><?php echo esc_html( get_the_archive_title() ); ?></h1>
<div class="category-description"><?php echo wp_kses_post( category_description() ); ?></div>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-tease-archive' ); ?>>
<?php
$hovercraft_primary_width = get_theme_mod( 'hovercraft_primary_width', 'wide' );
if ( $hovercraft_primary_width === 'wide' ) {
get_template_part( 'template-parts/content/featured-image-archive-large' );
} else {
get_template_part( 'template-parts/content/featured-image-archive' );
}
?>
<h4 class="entry-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo esc_html( get_the_title() ); ?></a></h4>
<?php get_template_part( 'template-parts/content/byline-archive' ); ?>
<div class="entry-summary post-excerpt-archive"><?php the_excerpt(); ?></div>
</article><!-- post-tease-archive -->
<?php endwhile; // end archive posts ?>
<?php else : ?>
<p><?php esc_html_e( 'No posts found.', 'hovercraft' ); ?></p>
<?php endif; ?><!-- end the loop -->
<?php endif; // end the loop ?>
<?php get_template_part( 'template-parts/content/pagination' ); ?>
<div class="clear"></div>
</div><!-- content-padded -->
</div><!-- content-wrapper -->
<div class="clear"></div>
</div><!-- primary -->
<?php if ( $show_sidebar ) : ?>
<?php get_template_part( 'sidebar' ); ?>
<?php endif; // end sidebar ?>
<div class="clear"></div>
</div><!-- inner -->
</div><!-- main -->
<?php get_template_part( 'footer' ); ?>