-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
51 lines (41 loc) · 1.59 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
/**
* @package WordPress
* @subpackage Inspira
* @since Inspira 0.1
*/
get_header(); ?>
<section class="blog single"><div class="contents">
<article class="single-entry">
<?php while ( have_posts() ) : the_post(); ?>
<header>
<h1><?php the_title(); ?></h1>
</header>
<footer>
<date><?php the_date(); ?></date> /
<?php
$count = 0;
$categories = get_the_category();
foreach ($categories as $category) {
$count++;
if ($category->cat_name != 'Featured') {
echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>';
if( $count != count($categories) ){
echo ', ';
}
}
}
?>
</footer>
<div class="content">
<figure class="featured-img">
<?php the_post_thumbnail( 'single-thumb' ); ?>
</figure>
<?php the_content(); ?>
<?php comments_template(); ?>
</div>
<?php endwhile; ?>
<?php get_sidebar(); ?>
</article>
</div></section>
<?php get_footer(); ?>