Advertisement
cosmocanuck

Page Template

Aug 21st, 2014
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2. /**
  3. * Category Page Template for Steam Showers.
  4. *
  5. * @package Impressive
  6. * @author Adam Abrams <adamabrams@shaw.ca>
  7. */
  8.  
  9.  
  10. // Content Area
  11.  
  12. remove_action( 'genesis_loop', 'genesis_do_loop' );
  13. add_action( 'genesis_loop', 'aa_category5_loop' );
  14.  
  15. function aa_category5_loop() {
  16.  
  17. the_content();
  18.  
  19.     //WP Query Start
  20.  
  21.     $per_page = 12;
  22.  
  23.     $args = array(
  24.     'posts_per_page' => $per_page,
  25.     'cat' => '5',
  26.     'paged' => get_query_var( 'paged' )
  27. );
  28.     $category_loop = genesis_custom_loop( $args );
  29. }
  30.  
  31. //Add Post Class Filter
  32. add_filter('post_class', 'sf_post_class');
  33. function sf_post_class($classes) {
  34.     global $loop_counter;
  35.     $classes[] = 'one-third';
  36.     if ($loop_counter % 3 == 0) {
  37.         $classes[] .= 'first ';
  38.     }
  39.     return $classes;
  40. }
  41.  
  42. genesis();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement