-
Notifications
You must be signed in to change notification settings - Fork 0
/
services.php
65 lines (61 loc) · 2.07 KB
/
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
<?php
/**
*
* Template Name: Services Page
*
* @package WordPress
* @subpackage WP-Bootstrap
* @since WP-Bootstrap 0.1
*/
get_header(); ?>
<div class="container">
<div class="row content">
<div class="span7 well">
<?php if (function_exists('bootstrapwp_breadcrumbs')) bootstrapwp_breadcrumbs(); ?>
<?php query_posts('post_type=services'); ?>
<?php $count=1 ?>
<ul class="nav nav-tabs">
<?php
// Blog post query
if (have_posts()) : while ( have_posts() ) : the_post(); ?>
<?php $title = strtolower(get_the_title()); ?>
<?php if ($count == 1) : ?>
<li class="active">
<?php else : ?>
<li>
<?php endif; ?>
<a href="#<?php echo str_replace(" ", "-", $title); ?>" data-toggle="tab">
<?php echo the_title(); ?>
</a>
</li>
<?php $count++ ?>
<?php endwhile; endif; ?>
</ul>
<div class="tab-content">
<?php $count=1 ?>
<?php
// Blog post query
if (have_posts()) : while ( have_posts() ) : the_post(); ?>
<?php $title = strtolower(get_the_title()); ?>
<?php if ($count == 1) : ?>
<div class="tab-pane active" id="<?php echo str_replace(" ", "-", $title); ?>">
<?php else : ?>
<div class="tab-pane" id="<?php echo str_replace(" ", "-", $title); ?>">
<?php endif; ?>
<?php echo the_content(); ?>
</div>
<?php $count++ ?>
<?php endwhile; endif; ?>
</div>
</div><!-- /.span7 -->
</div><!-- /.row -->
</div><!-- /.Container -->
<?php get_sidebar('blog'); ?>
<?php get_footer(); ?>
<!--call the collapse function-->
<script language="text/javascript">
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
})
</script>