forked from alliswell/Less
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
232 lines (158 loc) · 6.34 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php bloginfo('name'); ?> | <?php if( is_home() ) : echo bloginfo( 'description' ); endif; ?><?php wp_title( '', true ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php
/*-----------------------------------------------------------------------------------*/
/* Start header
/*-----------------------------------------------------------------------------------*/
?>
<header id="masthead" class="site-header" role="banner">
<div class="container">
<div class="gravatar">
<?php
// grab admin email and their photo
$admin_email = get_option('admin_email');
echo get_avatar( $admin_email, 100 );
?>
</div><!--/ author -->
<div id="brand">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> — <span><?php echo get_bloginfo( 'description' ); ?></span></h1>
</div><!-- /brand -->
<nav role="navigation" class="site-navigation main-navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- .site-navigation .main-navigation -->
<div class="clear"></div>
</div><!--/container -->
</header><!-- #masthead .site-header -->
<div class="container">
<div id="primary">
<div id="content" role="main">
<?php
/*-----------------------------------------------------------------------------------*/
/* Start Home loop
/*-----------------------------------------------------------------------------------*/
if( is_home() || is_archive() ) {
?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="post">
<h1 class="title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title() ?>
</a>
</h1>
<div class="post-meta">
<?php if( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link( __( 'Comment', 'break' ), __( '1 Comment', 'break' ), __( '% Comments', 'break' ) ); ?>
</span>
<?php endif; ?>
</div><!--/post-meta -->
<div class="the-content">
<?php the_content( 'Continue...' ); ?>
<?php wp_link_pages(); ?>
</div><!-- the-content -->
<div class="meta clearfix">
<div class="category"><?php echo get_the_category_list(); ?></div>
<div class="tags"><?php echo get_the_tag_list( '| ', ' ' ); ?></div>
</div><!-- Meta -->
</article>
<?php endwhile; ?>
<!-- pagintation -->
<div id="pagination" class="clearfix">
<div class="past-page"><?php previous_posts_link( 'Newer »' ); ?></div>
<div class="next-page"><?php next_posts_link( ' « Older' ); ?></div>
</div><!-- pagination -->
<?php else : ?>
<article class="post error">
<h1 class="404">Nothing posted yet</h1>
</article>
<?php endif; ?>
<?php } //end is_home(); ?>
<?php
/*-----------------------------------------------------------------------------------*/
/* Start Single loop
/*-----------------------------------------------------------------------------------*/
if( is_single() ) {
?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="post">
<h1 class="title"><?php the_title() ?></h1>
<div class="post-meta">
<?php if( comments_open() ) : ?>
<span class="comments-link">
<?php comments_popup_link( __( 'Comment', 'less' ), __( '1 Comment', 'less' ), __( '% Comments', 'less' ) ); ?>
</span>
<?php endif; ?>
</div><!--/post-meta -->
<div class="the-content">
<?php the_content( 'Continue...' ); ?>
<?php wp_link_pages(); ?>
</div><!-- the-content -->
<div class="meta clearfix">
<div class="category"><?php echo get_the_category_list(); ?></div>
<div class="tags"><?php echo get_the_tag_list( '| ', ' ' ); ?></div>
</div><!-- Meta -->
</article>
<?php endwhile; ?>
<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() )
comments_template( '', true );
?>
<?php else : ?>
<article class="post error">
<h1 class="404">Nothing posted yet</h1>
</article>
<?php endif; ?>
<?php } //end is_single(); ?>
<?php
/*-----------------------------------------------------------------------------------*/
/* Start Page loop
/*-----------------------------------------------------------------------------------*/
if( is_page()) {
?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article class="post">
<h1 class="title"><?php the_title() ?></h1>
<div class="the-content">
<?php the_content(); ?>
<?php wp_link_pages(); ?>
</div><!-- the-content -->
</article>
<?php endwhile; ?>
<?php else : ?>
<article class="post error">
<h1 class="404">Nothing posted yet</h1>
</article>
<?php endif; ?>
<?php } // end is_page(); ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div><!-- / container-->
<?php
/*-----------------------------------------------------------------------------------*/
/* Start Footer
/*-----------------------------------------------------------------------------------*/
?>
<footer class="site-footer" role="contentinfo">
<div class="site-info container">
<?php do_action( 'break_credits' ); ?>
<a href="http://wordpress.org/" title="A Semantic Personal Publishing Platform" rel="generator">Proudly powered by WordPress</a>
<span class="sep"> and </span>
<a href="http://lessmade.com/themes/less" rel="theme">LESS</a> by <a href="http://jarederickson.com" rel="designer">Jared Erickson</a>
</div><!-- .site-info -->
</footer><!-- #colophon .site-footer -->
<?php wp_footer(); ?>
</body>
</html>