103 lines
2.8 KiB
PHP
103 lines
2.8 KiB
PHP
<?php get_header("faq");?>
|
|
|
|
<div class="row">
|
|
|
|
<?php if (!is_home() ) {?>
|
|
<div class="col-xs-12 breadcrumb">
|
|
<?php if(function_exists('bcn_display')){bcn_display();}?>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<div class="col-xs-12">
|
|
<div class="col-sm-9 nopadding-left">
|
|
<?php /*if (have_posts()) : while (have_posts()) : the_post(); ?>
|
|
<article>
|
|
|
|
<h3 style="margin: 0; padding: 0 0 5px 0;"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></h3>
|
|
<!--<div class="content"><?php the_content();?></div>
|
|
<div class="text-right">Filed Under: <?php the_category(',') ?> <?php //comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?></div>-->
|
|
</article>
|
|
<hr />
|
|
|
|
<?php endwhile; else: ?>
|
|
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
|
|
<?php endif; ?>
|
|
|
|
<?php if(function_exists('wp_paginate')) {wp_paginate();} */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
?>
|
|
<h3>Latest FAQs</h3>
|
|
<ul class="faq">
|
|
<?php
|
|
$services = new WP_Query(
|
|
array(
|
|
'post_type' => 'faq',
|
|
'showposts' => 5
|
|
|
|
)
|
|
);
|
|
while ($services->have_posts()) : $services->the_post(); ?>
|
|
<li><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title(); ?></a></li>
|
|
<?php endwhile; ?>
|
|
</ul>
|
|
<?php
|
|
|
|
*/
|
|
|
|
|
|
// Get all the categories
|
|
$categories = get_terms(array('taxonomy'=>'faq_category', 'orderby' => 'term_order') );
|
|
|
|
// Loop through all the returned terms
|
|
foreach ( $categories as $category ):
|
|
|
|
// set up a new query for each category, pulling in related posts.
|
|
$services = new WP_Query(
|
|
array(
|
|
'post_type' => 'faq',
|
|
'showposts' => -1,
|
|
|
|
'order'=>'ASC',
|
|
'tax_query' => array(
|
|
array(
|
|
'taxonomy' => 'faq_category',
|
|
'terms' => array( $category->slug ),
|
|
'field' => 'slug'
|
|
)
|
|
)
|
|
)
|
|
);
|
|
?>
|
|
|
|
<h3><?php echo $category->name; ?></h3>
|
|
<ul class="faq">
|
|
<?php while ($services->have_posts()) : $services->the_post(); ?>
|
|
<li><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title(); ?></a></li>
|
|
<?php endwhile; ?>
|
|
</ul>
|
|
|
|
<?php
|
|
// Reset things, for good measure
|
|
$services = null;
|
|
wp_reset_postdata();
|
|
|
|
// end the loop
|
|
endforeach;
|
|
|
|
?>
|
|
</div>
|
|
<div class="col-sm-3 nopadding-right">
|
|
<?php get_sidebar("faq");?>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
|
|
<?php get_footer(); ?>
|