Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <section class="content">
- <?php get_template_part('inc/page-title'); ?>
- <div class="pad group">
- <?php if ((category_description() != '') && !is_paged()) : ?>
- <div class="notebox">
- <?php echo category_description(); ?>
- </div>
- <?php endif; ?>
- <?php if ( is_category() && !is_paged() ): // Show slider if posts are not 1 or 0 ?>
- <script type="text/javascript">
- // Check if first slider image is loaded, and load flexslider on document ready
- jQuery(document).ready(function(){
- var firstImage = jQuery('#flexslider-catag-featured').find('img').filter(':first'),
- checkforloaded = setInterval(function() {
- var image = firstImage.get(0);
- if (image.complete || image.readyState == 'complete' || image.readyState == 4) {
- clearInterval(checkforloaded);
- jQuery('#flexslider-catag-featured').flexslider({
- animation: "slide",
- useCSS: false, // Fix iPad flickering issue
- slideshow: false,
- directionNav: true,
- controlNav: true,
- pauseOnHover: true,
- slideshowSpeed: 7000,
- animationSpeed: 400,
- smoothHeight: true,
- touch: false
- });
- }
- }, 20);
- });
- </script>
- <div class="featured flexslider" id="flexslider-catag-featured">
- <ul class="slides">
- <?php while ( have_posts() ): the_post(); ?>
- <li>
- <?php get_template_part('content-featured'); ?>
- </li>
- <?php endwhile; ?>
- </ul>
- </div><!--/.featured-->
- <?php endif; ?>
- <?php if ( have_posts() ) : ?>
- <div class="post-list group">
- <?php $i = 1; echo '<div class="post-row">'; while ( have_posts() ): the_post(); ?>
- <?php get_template_part('content'); ?>
- <?php if($i % 2 == 0) { echo '</div><div class="post-row">'; } $i++; endwhile; echo '</div>'; ?>
- </div><!--/.post-list-->
- <?php get_template_part('inc/pagination'); ?>
- <?php endif; ?>
- </div><!--/.pad-->
- </section><!--/.content-->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement