Sindbad~EG File Manager
<?php
/*
* Template Name: Case Study
*/
if (!defined('WPINC')) {
die;
}
get_header();
$term = get_term_by('slug', get_query_var('case-study-category'), 'case-study-category');
$arg = array(
'hierarchical' => 1,
'show_option_none' => '',
'hide_empty' => 0,
'parent' => $term->term_id,
'taxonomy' => 'case-study-category'
);
$categories = get_categories($arg);
$category_name = $categories[0]->name;
$category_desc = $categories[0]->description;
?>
<!-- BEGIN #content -->
<section class="cat_desc">
<div class="cat_desc_heading">
<?php echo $category_name; ?>
</div>
<div class="cat_desc_text">
<p><?php echo $category_desc; ?></p>
</div>
</section>
<section <?php nice_content_class('main-content'); ?> role="main">
<header>
<div class="headerSearch">
<div class="hbreadcrumb">
<?php echo custom_breadcrumbs(); ?>
</div>
<div class="hsearchform">
<div id="search-wrap">
<form role="search" method="get" id="searchform" class="clearfix" action="<?php echo home_url('/'); ?>" autocomplete="off">
<div class="input">
<label for="s"><?php echo apply_filters('nice_livesearch_label', __('Have a question? Ask or enter a search term.', 'nicethemes')); ?></label>
<input placeholder="Have a question? Ask or enter a search term." type="text" name="s" id="s" />
<input type="submit" id="searchsubmit" value="" />
</div>
</form>
</div>
</div>
</div>
</header>
<div class="nice-knowledgebase clearfix">
<div class="row clearfix article-index">
<div class="case-study-canvas">
<?php
global $post;
$args = array( 'post_type' => 'case-study', 'posts_per_page' => -1,'order' => 'ASC' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="columns-3 case-study-canvas-inner">
<div class="case-study-image">
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" /></a>
</div>
<div class="case-study-title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<div class="case-study-excerpt">
<?php the_excerpt() ?>
</div>
<div class="case-study-more-link">
<a href="<?php the_permalink(); ?>"><span>more</span><img src="<?php echo get_stylesheet_directory_uri().'/images/more-btn.jpg' ?>" /></a>
</div>
</div>
<?php endwhile;
?>
</div>
</div>
</div>
<!-- END #content -->
</section>
<?php
get_footer();
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists