-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
159 lines (110 loc) · 3.86 KB
/
archive.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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
/**
* The Ball 2026 Archive Template.
*
* This overrides the parent theme template because we only want excerpts.
*
* @since 1.0.0
* @package The_Ball_2026
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
?>
<!-- archive.php -->
<div id="content_wrapper" class="clearfix">
<?php $site_banner = locate_template( 'assets/includes/site_banner.php' ); ?>
<?php if ( $site_banner ) : ?>
<?php load_template( $site_banner ); ?>
<?php endif; ?>
<div class="main_column clearfix">
<?php if ( have_posts() ) : ?>
<?php
// Search Nav.
$pl = get_next_posts_link( __( '« Older Posts', 'theball2026' ) );
$nl = get_previous_posts_link( __( 'Newer Posts »', 'theball2026' ) );
?>
<?php if ( $nl != '' || $pl != '' ) : ?>
<ul class="blog_navigation clearfix">
<?php if ( $nl != '' ) : ?>
<li class="alignright"><?php echo $nl; ?></li>
<?php endif; ?>
<?php if ( $pl != '' ) : ?>
<li class="alignleft"><?php echo $pl; ?></li>
<?php endif; ?>
</ul>
<?php endif; ?>
<div class="main_column_inner">
<div class="post">
<div class="post_header archive_header">
<?php the_archive_title( '<h2 class="pagetitle">', '</h2>' ); ?>
</div>
</div>
</div><!-- /main_column_inner -->
<div class="main_column_inner">
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<div class="post">
<?php
// Init.
$has_feature_image = false;
$feature_image_class = '';
// Do we have a feature image?
if ( has_post_thumbnail() ) {
$has_feature_image = true;
$feature_image_class = ' has_feature_image';
}
?>
<div class="post_header<?php echo $feature_image_class; ?>">
<div class="post_header_inner">
<?php
// Show feature image when we have one.
if ( $has_feature_image ) {
echo get_the_post_thumbnail( get_the_ID(), 'medium-640' );
}
?>
<div class="post_header_text">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute( [ 'before' => __( 'Permanent Link to: ', 'theball2026' ), 'after' => '' ] ); ?>"><?php the_title(); ?></a></h2>
</div><!-- /post_header_text -->
</div><!-- /post_header_inner -->
</div><!-- /post_header -->
<div class="entry clearfix">
<?php the_excerpt(); ?>
</div>
<p class="postmetadata"><?php the_tags( __( 'Tags: ', 'theball2026' ), ', ', '<br />' ); ?> <?php esc_html_e( 'Posted in ', 'theball2026' ) . the_category( ', ' ); ?> | <?php comments_popup_link( __( 'No Comments »', 'theball2026' ), __( '1 Comment »', 'theball2026' ), __( '% Comments »', 'theball2026' ) ); ?></p>
</div>
<?php endwhile; ?>
</div><!-- /main_column_inner -->
<?php if ( $nl != '' || $pl != '' ) : ?>
<ul class="blog_navigation clearfix">
<?php if ( $nl != '' ) : ?>
<li class="alignright"><?php echo $nl; ?></li>
<?php endif; ?>
<?php if ( $pl != '' ) : ?>
<li class="alignleft"><?php echo $pl; ?></li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php else : ?>
<div class="main_column_inner" id="main_column_splash">
<div class="post">
<div class="post_header archive_header">
<h2 class="pagetitle"><?php esc_html_e( 'Nothing found', 'theball2026' ); ?></h2>
</div>
</div>
</div><!-- /main_column_inner -->
<div class="main_column_inner">
<div class="post">
<div class="entrytext clearfix">
<p><?php esc_html_e( 'Try searching for something?', 'theball2026' ); ?></p>
<?php $searchform = locate_template( 'searchform.php' ); ?>
<?php if ( $searchform ) : ?>
<?php load_template( $searchform ); ?>
<?php endif; ?>
</div><!-- /entrytext -->
</div><!-- /post -->
</div><!-- /main_column_inner -->
<?php endif; ?>
</div><!-- /main_column -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>