-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.php
51 lines (33 loc) · 1.37 KB
/
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
<?php get_header(); ?>
<div class="container">
<div class="row">
<div class="col-md-9">
<?php if (have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="page-header">
<?php
$thumbnail_id = get_post_thumbnail_id();
$thumbnail_url = wp_get_attachment_image_src( $thumbnail_id, 'thumbnail-size', true );
$thumbnail_meta = get_post_meta ( $thumbnail_id, '_wp_attachment_image_alt', true );
?>
<p class="featured-image"><img src="<?php echo $thumbnail_url[0]; ?>" alt="<?php echo $thumbnail_meta; ?>"></p>
<h1><?php the_title(); ?></h1>
<p><em>
By <?php the_author(); ?>
on <?php the_time('l, F jS, Y'); ?>
in <?php the_category( ', '); ?>
<a href="<?php comments_link(); ?>"><?php comments_number(); ?> </a>
</p></em>
</div>
<?php the_content(); ?>
<hr>
<?php comments_template(); ?>
<?php endwhile; else: ?>
<div class="page-header">
<h1>Oh dammit!</h1>
</div>
<p>No content is available for this page</p>
<?php endif; ?>
</div>
<?php get_sidebar( 'blog' ); ?>
</div>
<?php get_footer(); ?>