-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
38 lines (29 loc) · 1.09 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
<?php
/**
* The template for displaying all single posts
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); // the loop ?>
<?php // Single post for 'crags' and 'problem' categories ?>
<?php $category = get_the_category()[0]->slug; // Get category for current post ?>
<?php if( $category == 'crag' ) : ?>
<?php get_template_part( 'single', $category ); ?>
<?php //twentythirteen_post_nav(); ?>
<?php comments_template(); ?>
<?php elseif( $category == 'problem' ) : ?>
<?php get_template_part( 'single', $category ); ?>
<?php //twentythirteen_post_nav(); ?>
<?php comments_template(); ?>
<?php else : // normal posts + format ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php //twentythirteen_post_nav(); ?>
<?php comments_template(); ?>
<?php endif; ?>
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>