-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-single.php
executable file
·168 lines (154 loc) · 7.24 KB
/
content-single.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
<?php
/**
* @package anthonyjones
*/
?>
<!-- Set your background image for this header on the line below. -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> itemscope itemtype="http://schema.org/Article">
<main>
<div class="content-single-top">
<?php
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
?>
<div class="section no-pad-bot overlay" itemprop="image" content="<?=$url?>" id="index-banner" style="background-color: rgba(0, 148, 255, 0.26);
background-image: linear-gradient(
rgba(0, 0, 0, 0.3),
rgba(0, 0, 0, 0.3) ),
url('<?=$url?>');
background-repeat: no-repeat;
background-attachment: scroll;
background-position: center top;
background-size: cover;
-o-background-size: cover;">
<div class="container">
<div class="heading">
<div class="badges center">
<?php echo get_the_category_list(', '); ?>
</div>
<h1 itemprop="headline" class="title-padding header center white-text"><?php the_title(); ?></h1>
<div class="center">
<h2 itemprop="alternativeHeadline" id="subtitle" class="light header col s12 white-text"><?php get_the_subtitle( $post ); ?></h2>
</div>
<div class="post-details center">
<span class="date updated white-text" itemprop="datePublished">
<?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
</span>
<span class="bullet white-text"> • </span>
<span class="author vcard white-text">
by <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<a class="white-text" title="" rel="author" itemprop="name"><?php the_author(); ?></a>
</span>
</span>
<!-- <span class="bullet white-text"> • </span>
<i class="fa fa-comments white-text"></i>
<a class="white-text" href="#disqus_thread"></a> -->
<span class="bullet white-text"> • </span>
<span class="white-text"> <?php if(function_exists('the_views')) { the_views(); } ?> </span>
</div>
</div>
<br><br>
</div>
</div>
<!-- Post Content -->
<div class="container">
<div class="row">
<div class="image-caption center-align">
<?php echo the_post_thumbnail_caption(); ?>
</div>
<div class="col s12 m12 l8 offset-l2">
<?php get_template_part('share'); ?>
<div class="container">
<div class="flow-text" itemprop="articleBody">
<?php the_content(); ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'anthonyjones' ),
'after' => '</div>',
) );
?>
</div> <!-- .entry-content -->
<br>
<div class="row">
<div class="badges inverse right">
<?php
$tags_list = get_the_tag_list( '', __( '', 'anthonyjones' ) );
if ( $tags_list ) {
printf( '<span class="tags-links">' . __( '%1$s', 'anthonyjones' ) . '</span>', $tags_list );
}
?>
</div>
<div class="badges inverse large left">
<a class="waves-effect my-post-like" data-id="<?php the_ID(); ?>">
<i class="fa fa-thumbs-o-up"></i> Like
<span class="like-count"><?php display_post_likes( get_the_ID() ); ?></span>
</a>
</div>
<div class="badges inverse large left">
<!-- Modal Trigger -->
<a href="#modal1" class="waves-effect modal-trigger"><i class="fa fa-share"></i> Share</a>
</div>
</div>
<br>
</div>
</div>
<?php $key_1 = get_post_meta( get_the_ID(), 'title_one', true ); ?>
<?php $key_2 = get_post_meta( get_the_ID(), 'title_two', true ); ?>
<?php $key_3 = get_post_meta( get_the_ID(), 'title_three', true ); ?>
<?php $key_4 = get_post_meta( get_the_ID(), 'title_four', true ); ?>
<?php $key_5 = get_post_meta( get_the_ID(), 'title_five', true ); ?>
<?php $key_6 = get_post_meta( get_the_ID(), 'title_six', true ); ?>
<div class="col hide-on-med-and-down m2 l2">
<div class="tabs-wrapper">
<ul class="section table-of-contents">
<?php
if(!empty($key_1)) {
echo '<li><a href="#';
print $key_1;
echo '">';
print $key_1;
echo '</a></li>';
}
if(!empty($key_2)) {
echo '<li><a href="#';
print $key_2;
echo '">';
print $key_2;
echo '</a></li>';
}
if(!empty($key_3)) {
echo '<li><a href="#';
print $key_3;
echo '">';
print $key_3;
echo '</a></li>';
}
if(!empty($key_4)) {
echo '<li><a href="#';
print $key_4;
echo '">';
print $key_4;
echo '</a></li>';
}
if(!empty($key_5)) {
echo '<li><a href="#';
print $key_5;
echo '">';
print $key_5;
echo '</a></li>';
}
if(!empty($key_6)) {
echo '<li><a href="#';
print $key_6;
echo '">';
print $key_6;
echo '</a></li>';
}
?>
</ul>
</div>
</div>
</div>
</div> <!-- End Post Content -->
</div>
</main>
</article> <!-- #post-## -->