-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
140 lines (95 loc) · 3.42 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
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
<?php
/**
* The Ball 2022 Blog Archive Template.
*
* This overrides the parent theme template.
*
* @since 1.0.0
* @package The_Ball_2022
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
get_header();
?>
<!-- index.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', 'theball2022' ) );
$nl = get_previous_posts_link( __( 'Newer Posts »', 'theball2022' ) );
?>
<?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">
<?php while ( have_posts() ) : ?>
<?php the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<?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: ', 'theball2022' ), '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: ', 'theball2022' ), ', ', '<br />' ); ?> <?php esc_html_e( 'Posted in ', 'theball2022' ) . the_category( ', ' ); ?> | <?php comments_popup_link( __( 'No Comments »', 'theball2022' ), __( '1 Comment »', 'theball2022' ), __( '% Comments »', 'theball2022' ) ); ?></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">
<div class="post">
<h2><?php esc_html_e( 'Page not found', 'theball2022' ); ?></h2>
<p><?php esc_html_e( 'Sorry, but you are looking for something that isn’t here. Try a search?', 'theball2022' ); ?></p>
<?php $searchform = locate_template( 'searchform.php' ); ?>
<?php if ( $searchform ) : ?>
<?php load_template( $searchform ); ?>
<?php endif; ?>
</div><!-- /post -->
</div><!-- /main_column_inner -->
<?php endif; ?>
</div><!-- /main_column -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>