forked from themegrill/spacious
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-single.php
63 lines (57 loc) · 1.51 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
<?php
/**
* The template used for displaying page content in page.php
*
* @package ThemeGrill
* @subpackage Spacious
* @since Spacious 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'spacious_before_post_content' ); ?>
<div class="entry-content clearfix">
<?php
the_content();
$photo_album_links = get_post_meta( get_the_ID(), 'photo-album-link' );
if( !empty( $photo_album_links ) ) {
?>
<div class="tags">
<span class="tags-label"><?php _e( 'Albums', 'spacious' ); ?></span>
<span class="tags-container">
<?php
foreach ($photo_album_links as $link) {
$link_obj = json_decode( $link );
?>
<a href="<?php echo $link_obj->url; ?>"><?php echo $link_obj->name; ?></a>
<?php
}
?>
</span>
</div>
<?php
}
$spacious_tag_list = get_the_tag_list( '', ' ', '' );
if( !empty( $spacious_tag_list ) ) {
?>
<div class="tags">
<span class="tags-label"><?php _e( 'Tags', 'spacious' ); ?></span>
<span class="tags-container"><?php echo $spacious_tag_list; ?></span>
</div>
<?php
}
$spacious_category_list = get_the_category_list( ' ' );
if( !empty( $spacious_category_list ) ) {
?>
<div class="tags">
<span class="tags-label"><?php _e( 'Categories', 'spacious' ); ?></span>
<span class="tags-container"><?php echo $spacious_category_list; ?></span>
</div>
<?php
}
?>
</div>
<?php spacious_entry_meta(); ?>
<?php
do_action( 'spacious_after_post_content' );
?>
</article>