-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle.php
More file actions
94 lines (64 loc) · 2.18 KB
/
Copy pathsingle.php
File metadata and controls
94 lines (64 loc) · 2.18 KB
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
<?php get_header(); ?>
<div class="whatpageisthis">single.php</div>
<div class="container">
<div class="row">
<main class="span8" id="content">
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
if ( has_post_format( 'quote' ) ) {
// do some stuff
get_template_part('format', 'quote');
} elseif ( has_post_format( 'video' ) ) {
// do some other stuff
get_template_part('format', 'video');
} else { ?>
<article class="media-body">
<h1 class="h2-style">
<?php the_title();?>
</h1>
<p><small><?php the_time('F j, Y'); ?> - <?php the_time('g:i a'); ?></small></p>
<div class="media-page">
<?php
if ( has_post_thumbnail() ) {
?>
<?php
the_post_thumbnail('featured-in-content', array('class' => 'media-object'));
if(get_post(get_post_thumbnail_id())->post_excerpt) { ?>
<span class="full-caption media-object"><?php echo get_post( get_post_thumbnail_id() )->post_excerpt ?></span>
<?php } ?>
<?php
}
else { }
?>
</div><!-- media -->
<?php the_content(); ?>
</article><!-- media-body -->
<?php }
endwhile; ?>
<ul class="pager">
<li class="previous">
<?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentytwelve' ) . '</span> %title' ); ?>
</li>
<li class="next">
<?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentytwelve' ) . '</span>' ); ?>
</li>
</ul>
<!--<nav class="nav-single">
<span class="nav-previous"></span>
<span class="nav-next"></span>
</nav>.nav-single -->
<?php wp_reset_query(); endif; ?>
</main><!--#content .span8 -->
<?php get_sidebar(); ?>
</div><!-- row -->
</div><!-- container -->
<?php get_footer();
/* Redfinition of core function. Removed due to conflict as hotfix.
function the_post_thumbnail_caption() {
global $post;
$thumbnail_id = get_post_thumbnail_id($post->ID);
$thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));
if ($thumbnail_image && isset($thumbnail_image[0])) {
echo '<span>'.$thumbnail_image[0]->post_excerpt.'</span>';
}
} */