Advertisement
Guest User

Untitled

a guest
Oct 31st, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Template for displaying product archives, including the main shop page which is a post type archive.
  4. *
  5. * Override this template by copying it to yourtheme/woocommerce/archive-product.php
  6. *
  7. * @author WooThemes
  8. * @package WooCommerce/Templates
  9. * @version 2.0.0
  10. */
  11.  
  12. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  13.  
  14. get_header('shop'); ?>
  15.  
  16. <?php
  17. /**
  18. * woocommerce_before_main_content hook
  19. *
  20. * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
  21. * @hooked woocommerce_breadcrumb - 20
  22. */
  23. do_action('woocommerce_before_main_content');
  24. ?>
  25.  
  26. <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
  27.  
  28. <div id="title">
  29.  
  30. <h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
  31.  
  32. </div><!--END TITLE-->
  33.  
  34. <div id="commerce-nav">
  35.  
  36. <ul>
  37. <li class="categories-drop"><a href="#">Categories</a>
  38.  
  39. <ul>
  40. <li><a href="/blog/product-category/box_breaks_football/">Football</a></li>
  41. <li><a href="/blog/product-category/box_breaks_basketball/">Basketball</a></li>
  42. <li><a href="/blog/product-category/box_breaks_misc_sports/">Misc Sports</a></li>
  43. </ul>
  44.  
  45. </li>
  46. <li class="account"><a href="/blog/my-account/">Account</a></li>
  47. <li class="view-cart"><a href="/blog/cart/">Cart</a></li>
  48.  
  49. </ul>
  50.  
  51. </div><!--END NAV-->
  52.  
  53. <div class="clear"></div>
  54.  
  55. <?php endif; ?>
  56.  
  57. <?php do_action( 'woocommerce_archive_description' ); ?>
  58.  
  59. <?php if ( have_posts() ) : ?>
  60.  
  61. <?php
  62. /**
  63. * woocommerce_before_shop_loop hook
  64. *
  65. * @hooked woocommerce_result_count - 20
  66. * @hooked woocommerce_catalog_ordering - 30
  67. */
  68. do_action( 'woocommerce_before_shop_loop' );
  69. ?>
  70.  
  71. <?php woocommerce_product_loop_start(); ?>
  72.  
  73. <?php woocommerce_product_subcategories(); ?>
  74.  
  75. <?php // while ( have_posts() ) : the_post(); ?>
  76.  
  77. <?php // woocommerce_get_template_part( 'content', 'product' ); ?>
  78.  
  79. <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 0) : $wp_query->next_post(); else : the_post(); ?>
  80.  
  81. <div id="left-column-prod">
  82. <?php woocommerce_get_template_part( 'content', 'product' ); ?>
  83. </div>
  84.  
  85. <?php endif; endwhile; else: ?>
  86. <div>Alternate content</div>
  87. <?php endif; ?>
  88.  
  89. <?php $i = 0; rewind_posts(); ?>
  90.  
  91. <?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 0) : $wp_query->next_post(); else : the_post(); ?>
  92.  
  93. <div id="right-column-prod">
  94. <?php woocommerce_get_template_part( 'content', 'product' ); ?>
  95. </div>
  96.  
  97. <?php endif; endwhile; else: ?>
  98. <div>Alternate content</div>
  99. <?php endif; ?>
  100.  
  101. <?php // endwhile; // end of the loop. ?>
  102.  
  103. <?php woocommerce_product_loop_end(); ?>
  104.  
  105. <?php
  106. /**
  107. * woocommerce_after_shop_loop hook
  108. *
  109. * @hooked woocommerce_pagination - 10
  110. */
  111. do_action( 'woocommerce_after_shop_loop' );
  112. ?>
  113.  
  114. <?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
  115.  
  116. <?php woocommerce_get_template( 'loop/no-products-found.php' ); ?>
  117.  
  118. <?php endif; ?>
  119.  
  120. <?php
  121. /**
  122. * woocommerce_after_main_content hook
  123. *
  124. * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
  125. */
  126. do_action('woocommerce_after_main_content');
  127. ?>
  128.  
  129. <?php
  130. /**
  131. * woocommerce_sidebar hook
  132. *
  133. * @hooked woocommerce_get_sidebar - 10
  134. */
  135. do_action('woocommerce_sidebar');
  136. ?>
  137.  
  138. <?php get_footer( 'store' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement