Advertisement
sparkweb

FoxyShop: All Products Shortcode

Mar 11th, 2013
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. <?php
  2. global $product;
  3. ?>
  4.  
  5. <?php foxyshop_include('header'); ?>
  6. <div id="foxyshop_container">
  7.     <?php
  8.     //Write Category Title
  9.     echo '<h1 id="foxyshop_category_title">Products</h1>'."\n";
  10.  
  11.     //Write Product Sort Dropdown
  12.     //foxyshop_sort_dropdown();
  13.  
  14.     //Feel free to put a store description here
  15.     //echo '<p></p>'."\n";
  16.  
  17.  
  18.     //Run the query for all products in this category
  19.     global $paged, $wp_query;
  20.     $paged = get_query_var('page');
  21.     $args = array('post_type' => 'foxyshop_product', 'post_status' => 'publish', 'posts_per_page' => foxyshop_products_per_page(), 'paged' => get_query_var('page'));
  22.     $args = array_merge($args,foxyshop_sort_order_array());
  23.     query_posts($args);
  24.     echo '<ul class="foxyshop_product_list">';
  25.     while (have_posts()) :
  26.         the_post();
  27.  
  28.         //Product Display
  29.         foxyshop_include('product-loop');
  30.  
  31.     endwhile;
  32.     echo '</ul>';
  33.  
  34.     //Pagination
  35.     foxyshop_get_pagination();
  36.     ?>
  37. </div>
  38. <?php foxyshop_include('footer'); ?>
  39.  
  40. <script type="text/javascript">
  41. jQuery(document).ready(function($){
  42.     //This is set up for a two-column display. For a three column you need to do: nth-child(3n+1)
  43.     $(".foxyshop_product_list>li:nth-child(odd)").css("clear","left");
  44. });
  45. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement