dangermoose

loop-shop.php

Feb 7th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.24 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Loop - Shop
  4.  *
  5.  * This is the loop file used on the "Blog" page template.
  6.  *
  7.  * @package WooFramework
  8.  * @subpackage Template
  9.  */
  10. global $more; $more = 0;
  11.  
  12. woo_loop_before();
  13.  
  14. // Fix for the WordPress 3.0 "paged" bug.
  15. $paged = 1;
  16. if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); }
  17. if ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); }
  18. $paged = intval( $paged );
  19.  
  20. $query_args = array(
  21.                     'post_type' => 'post',
  22.                     'posts_per_page' => '20',
  23.                     'paged' => $paged
  24.                 );
  25.  
  26. $query_args = apply_filters( 'woo_blog_template_query_args', $query_args ); // Do not remove. Used to exclude categories from displaying here.
  27.  
  28. remove_filter( 'pre_get_posts', 'woo_exclude_categories_homepage', 10 );
  29.  
  30. query_posts("cat=16&post_type=post&posts_per_page=10&paged=$paged");
  31.        
  32. if ( have_posts() ) { $count = 0;
  33. ?>
  34.  
  35. <div class="fix"></div>
  36.  
  37. <?php
  38.     while ( have_posts() ) { the_post(); $count++;
  39.  
  40.         //woo_get_template_part( 'content', get_post_type() );
  41.         woo_get_template_part( 'content', 'shop' ); // Get the page content template file, contextually.
  42.  
  43.     } // End WHILE Loop
  44. } else {
  45.     get_template_part( 'content', 'noposts' );
  46. } // End IF Statement
  47.  
  48. woo_loop_after();
  49.  
  50. woo_pagenav();
  51. ?>
Advertisement
Add Comment
Please, Sign In to add comment