Advertisement
Guest User

minimatica loop-slider-categories.php

a guest
Dec 5th, 2012
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Loop when viewing in gallery mode, for category archives only. Home page blog slider uses loop-slider.php with a modified query.
  4. *
  5. * @package WordPress
  6. * @subpackage Minimatica
  7. * @since Minimatica 1.0
  8. */
  9. ?>
  10.  
  11.  
  12.  
  13. <?php
  14. global $wp_query, $query_string;
  15. $paged = get_query_var( 'paged' );
  16. $args = array(
  17. 'posts_per_page' => 6,
  18. 'paged' => $paged,
  19. 'ignore_sticky_posts' => 1,
  20. 'order' => 'ASC'
  21. );
  22. $args = wp_parse_args( $args, $wp_query->query );
  23. ?>
  24.  
  25. <?php query_posts( $args ); ?>
  26. <?php if( have_posts() ) : ?>
  27.  
  28.  
  29. <div id="ajax-content">
  30.  
  31. <ul id="slides" class="kwicks">
  32.  
  33. <?php while( have_posts() ) : the_post(); ?>
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. <?php $thumbnail = null; ?>
  42. <?php if( has_post_thumbnail() ) : ?>
  43. <?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-thumb' ); ?>
  44. <?php endif; ?>
  45. <li class="slide">
  46. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?><?php if( isset( $thumbnail ) ) : ?> style="background:url(<?php echo $thumbnail[0]; ?>) center no-repeat"<?php endif; ?>>
  47. <div class="opacity"></div>
  48. <a class="overlay" href="<?php the_permalink(); ?>" rel="bookmark"></a>
  49. <div class="entry-container">
  50. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  51. <div class="entry-summary">
  52. <?php the_excerpt(); ?>
  53. <div class="clear"></div>
  54. </div><!-- .entry-summary -->
  55. </div><!-- .entry-container -->
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. </div><!-- .post -->
  63. </li>
  64. <?php $thumbnaill = null; ?>
  65. <?php endwhile; ?>
  66.  
  67.  
  68.  
  69.  
  70.  
  71. </ul><!-- #slides -->
  72. <div class="clear"></div>
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83. <?php if ( $wp_query->max_num_pages > 1 ) : ?>
  84. <div id="nav-slider">
  85. <div class="nav-previous"><?php next_posts_link( '' ); ?></div>
  86. <div class="nav-next"><?php previous_posts_link( '' ); ?></div>
  87. </div><!-- #nav-above -->
  88. <?php endif; ?>
  89. <?php rewind_posts(); ?>
  90. </div><!-- #ajax-content -->
  91. <?php endif; ?>
  92.  
  93.  
  94.  
  95. <?php wp_reset_query(); ?>
  96.  
  97.  
  98. <p style="color: #fff; margin-left:10px;">
  99. <?php
  100. $category = get_the_category();
  101. echo $category[0]->cat_name;
  102. ?></p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement