-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
170 lines (143 loc) · 4.27 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php
/**
*
* Silverclean WordPress Theme by Iceable Themes | https://www.iceablethemes.com
*
* Copyright 2013-2020 Iceable Themes - https://www.iceablethemes.com
*
* Main Index
*
*/
get_header();
?>
<div id="main-content" class="container">
<div id="page-container" class="left with-sidebar">
<?php
/* SEARCH CONDITIONAL TITLE */
if ( is_search() ) :
?>
<h1 class="page-title"><?php esc_html_e( 'Search Results for ', 'silverclean-lite' ); ?>"<?php the_search_query(); ?>"</h1>
<?php
endif;
/* ARCHIVE CONDITIONAL TITLE */
if ( is_archive() ) :
?>
<h1 class="page-title"><?php the_archive_title(); ?></h1>
<?php
endif;
/* DEFAULT CONDITIONAL TITLE */
if ( is_home() && ! is_front_page() ) :
?>
<h1 class="page-title"><?php echo get_the_title( get_option( 'page_for_posts' ) ); ?></h1>
<?php
endif;
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post-contents">
<h3 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a>
</h3>
<div class="post-content">
<?php
if (
get_post_format()
|| post_password_required()
|| 'content' === get_theme_mod( 'silverclean_blog_index_content' )
) :
the_content();
else :
the_excerpt();
endif;
?>
</div>
</div>
<?php
if ( 'post' === get_post_type() ) :
?>
<div class="postmetadata">
<?php
if ( '' !== get_the_post_thumbnail() ) : // As recommended from the WP codex, to avoid potential failure of has_post_thumbnail()
?>
<div class="thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php
the_post_thumbnail(
'post-thumbnail',
array(
'class' => 'scale-with-grid',
)
);
?>
</a>
</div>
<?php
endif;
?>
<span class="meta-date published">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_time( get_option( 'date_format' ) ); ?>
</a>
</span>
<?php
// Echo updated date for hatom-feed - not to be displayed on front end
?>
<span class="updated">
<?php the_modified_date( get_option( 'date_format' ) ); ?>
</span>
<span class="meta-author vcard author">
<?php
printf(
// Translators: %s is the author's name
wp_kses_post( __( 'By %s', 'silverclean-lite' ) ),
'<span class="fn">' . get_the_author() . '</span>'
);
?>
</span>
<span class="meta-category"><?php esc_html_e( 'In ', 'silverclean-lite' ); ?><?php the_category( ', ' ); ?></span>
<span class="meta-comments"><?php comments_popup_link( __( 'No Comment', 'silverclean-lite' ), __( '1 Comment', 'silverclean-lite' ), __( '% Comments', 'silverclean-lite' ) ); ?></span>
<?php
if ( has_tag() ) :
echo '<span class="tags">';
the_tags( '<span class="tag">', '</span><span>', '</span></span>' );
endif;
?>
<span class="editlink">
<?php edit_post_link( __( 'Edit', 'silverclean-lite' ), '', '' ); ?>
</span>
</div>
<?php
endif;
?>
</div>
<hr />
<?php
endwhile;
else :
if ( is_search() ) :
?>
<h2><?php esc_html_e( 'Nothing Found', 'silverclean-lite' ); ?></h2>
<p><?php esc_html_e( 'Maybe a search will help ?', 'silverclean-lite' ); ?></p>
<?php
get_search_form();
else :
?>
<h2><?php esc_html_e( 'Not Found', 'silverclean-lite' ); ?></h2>
<p><?php esc_html_e( 'What you are looking for isn\'t here...', 'silverclean-lite' ); ?></p>
<?php
endif;
endif;
?>
<div class="page_nav">
<div class="previous"><?php next_posts_link( __( 'Previous Posts', 'silverclean-lite' ) ); ?></div>
<div class="next"><?php previous_posts_link( __( 'Next Posts', 'silverclean-lite' ) ); ?></div>
</div>
</div>
<div id="sidebar-container" class="right">
<?php get_sidebar(); ?>
</div>
</div>
<?php
get_footer();