-
Notifications
You must be signed in to change notification settings - Fork 7
/
content-single.php
55 lines (49 loc) · 1.5 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
<?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
if ( ( get_theme_mod( 'spacious_featured_image_single_post_page', 0 ) == 1 ) && has_post_thumbnail() ) {
$title_attribute = get_the_title( $post->ID );
$thumb_id = get_post_thumbnail_id( get_the_ID() );
$img_altr = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
$img_alt = ! empty( $img_altr ) ? $img_altr : $title_attribute;
$post_thumbnail_attr = array(
'alt' => esc_attr( $img_alt ),
'title' => esc_attr( $title_attribute ),
);
the_post_thumbnail( 'featured-blog-large', $post_thumbnail_attr );
}
the_content();
$spacious_tag_list = get_the_tag_list( '', ' ', '' );
if ( ! empty( $spacious_tag_list ) ) {
?>
<div class="tags">
<?php
_e( 'Tagged on: ', 'spacious' );
echo $spacious_tag_list;
?>
</div>
<?php
}
wp_link_pages( array(
'before' => '<div style="clear: both;"></div><div class="pagination clearfix">' . __( 'Pages:', 'spacious' ),
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>'
) );
?>
</div>
<?php spacious_entry_meta(); ?>
<?php
do_action( 'spacious_after_post_content' );
?>
</article>