Skip to content

Instantly share code, notes, and snippets.

Created October 22, 2014 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/b747a2c51bc5bb7a58dd to your computer and use it in GitHub Desktop.
Save anonymous/b747a2c51bc5bb7a58dd to your computer and use it in GitHub Desktop.
<?php
/**
* The template for displaying category pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package DW Focus
* @since DW Focus 1.0
*/
get_header(); ?>
<?php
// vars
$queried_object = get_queried_object();
$taxonomy = $queried_object->taxonomy;
$image = get_field('category_image', $queried_object);
$lead = get_field('category_lead', $queried_object);
?>
<div id="primary" class="site-content category span12">
<?php
if( !empty($image) ): ?>
<div id="featured_image_category" style="height:200px;">
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
</div>
<?php endif; ?>
<div class="content-bar row-fluid">
<h1 class="page-title"><?php printf( __( '%s articles', 'dw-focus' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1>
</div>
<?php if( !empty($lead) ): ?>
<div class="lead"><p><?php echo $lead; ?></p></div>
<?php endif; ?>
<h2 style="text-align: center;">Luxury and Boutique Hotels in <?php printf( __( '%s', 'dw-focus' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h2>
<?php get_template_part( 'content', 'venueloop'); ?>
<div class="clearfix"></div>
<h2 style="text-align: center;">Explore <?php printf( __( '%s', 'dw-focus' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?> with our unique travel experiences</h2>
<?php get_template_part( 'content', 'storyloop' ); ?>
<div class="clearfix"></div>
<?php dw_focus_pagenavi(); ?>
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment