-
Notifications
You must be signed in to change notification settings - Fork 5
/
home.php
executable file
·172 lines (116 loc) · 3.77 KB
/
home.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
<?php get_header(); ?>
<div class="page-header clearfix">
<h1 class="pull-left">
<?php _e( 'News', 'orbis' ); ?>
<small>
<?php _e( 'Overview of the latest news', 'orbis' ); ?>
</small>
</h1>
<a class="btn btn-primary pull-right" href="<?php bloginfo( 'url' ); ?>/wp-admin/post-new.php">
<span class="glyphicon glyphicon-plus"></span> <?php _e( 'Add post', 'orbis' ); ?>
</a>
</div>
<div class="row">
<div class="col-md-8">
<div class="panel">
<header>
<h3><?php _e( 'News', 'orbis' ); ?></h3>
</header>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
<div class="content">
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'orbis' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<div class="entry-meta">
<?php orbis_posted_on(); ?>
</div>
<div class="entry-content clearfix">
<?php if ( has_post_thumbnail() ) : ?>
<div class="thumbnail">
<?php the_post_thumbnail( 'thumbnail' ); ?>
</div>
<?php endif; ?>
<?php the_content( __( 'Continue reading →', 'orbis' ) ); ?>
</div>
<div class="entry-meta">
<?php $show_sep = false; ?>
<?php if ( 'post' == get_post_type() ) :
$categories_list = get_the_category_list( __( ', ', 'orbis' ) );
if ( $categories_list ) : ?>
<span class="cat-links">
<?php
printf( __( '<span class="%1$s">Posted in</span> %2$s', 'orbis' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
$show_sep = true;
?>
</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', __( ', ', 'orbis' ) );
if ( $tags_list ) :
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; ?>
<span class="tag-links">
<?php
printf( __( '<span class="%1$s">Tagged</span> %2$s', 'orbis' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
$show_sep = true;
?>
</span>
<?php endif; endif; ?>
<?php if ( comments_open() ) : if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; ?>
<span class="comments-link">
<?php comments_popup_link( __( 'Leave a reply', 'orbis' ), __( '1 reply', 'orbis' ), __( '% replies', 'orbis' ) ); ?>
</span>
<?php endif; ?>
</div>
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<p>
<?php _e( 'No results found.', 'orbis' ); ?>
</p>
<?php endif; ?>
</div>
<?php orbis_content_nav(); ?>
</div>
<div class="col-md-4">
<div class="panel">
<header>
<h3><?php _e( 'Categories', 'orbis' ); ?></h3>
</header>
<ul class="list">
<?php
wp_list_categories( array(
'orderby' => 'name',
'title_li' => ''
) );
?>
</ul>
</div>
<?php
$tags = get_tags();
if ( $tags ) : ?>
<div class="panel">
<header>
<h3><?php _e( 'Tags', 'orbis' ); ?></h3>
</header>
<div class="content">
<?php
wp_tag_cloud( array(
'smallest' => 10,
'largest' => 22,
'unit' => 'px'
) );
?>
</div>
</div>
<?php endif; ?>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>