/
template-services.php
171 lines (53 loc) · 2.57 KB
/
template-services.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
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
<?php
/*
Template Name: Services
*/
get_header();
$sidebar_position = tfuse_sidebar_position();
?>
<div <?php tfuse_class('middle'); ?>>
<div class="container_12">
<?php if ($sidebar_position == 'left') : ?>
<div class="grid_4 sidebar">
<?php get_sidebar(); ?>
</div><!--/ .sidebar -->
<?php endif; ?>
<div <?php tfuse_class('content'); ?>>
<div class="post-item">
<?php tfuse_custom_title(); ?>
<div class="entry">
<?php
if (have_posts()) : the_post();
the_content();
endif;
$bottom_content = tfuse_shortcode_content('after',true);
if ( get_query_var('paged') ) $paged = get_query_var('paged'); elseif ( get_query_var('page') ) $paged = get_query_var('page'); else $paged = 1;
$perpage = tfuse_options('services_per_page',6);
query_posts("post_type=services&posts_per_page=$perpage&paged=$paged");
if (have_posts()) : while (have_posts()) : the_post();
tfuse_media();
?>
<h3 class="title_blue2"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php if ( tfuse_options('post_content') == 'content' ) the_content(''); else the_excerpt(); ?>
<?php endwhile; else: ?>
<h5><?php _e('Sorry, no posts matched your criteria.', 'tfuse') ?></h5>
<div class="divider_space"></div>
<?php endif; ?>
<div class="divider_space"></div>
<?php echo $bottom_content; ?>
<div class="clear"></div>
<?php tfuse_pagination(); ?>
<?php wp_reset_query(); ?>
</div><!--/ .entry -->
</div><!--/ .post-item -->
</div><!--/ .content -->
<?php if ($sidebar_position == 'right') : ?>
<div class="grid_4 sidebar">
<?php get_sidebar(); ?>
</div><!--/ .sidebar -->
<?php endif; ?>
<div class="clear"></div>
</div><!--/ .container_12 -->
</div><!--/ .middle -->
<div class="middle_bot"></div>
<?php get_footer(); ?>