Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template name: Out of stock
- *
- *
- * @package WooFramework
- * @subpackage Template
- */
- get_header();
- ?>
- <!-- #content Starts -->
- <?php woo_content_before(); ?>
- <div id="content" class="col-full">
- <div id="main-sidebar-container">
- <!-- #main Starts -->
- <?php woo_main_before(); ?>
- <section id="main">
- <ul class="products">
- <?php
- $args = array(
- 'key' => '_stock_status',
- 'value' => 'outofstock',
- 'compare' => '='
- );
- $the_query = new WP_Query( $args ); ?>
- <?php if ( $the_query->have_posts() ) : ?>
- <!-- pagination here -->
- <!-- the loop -->
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <li <?php post_class( $classes ); ?>>
- <?php do_action( 'woocommerce_before_shop_loop_item' ); ?>
- <a href="<?php the_permalink(); ?>">
- <?php
- /**
- * woocommerce_before_shop_loop_item_title hook
- *
- * @hooked woocommerce_show_product_loop_sale_flash - 10
- * @hooked woocommerce_template_loop_product_thumbnail - 10
- */
- do_action( 'woocommerce_before_shop_loop_item_title' );
- ?>
- <h3><?php the_title(); ?></h3>
- <?php
- /**
- * woocommerce_after_shop_loop_item_title hook
- *
- * @hooked woocommerce_template_loop_rating - 5
- * @hooked woocommerce_template_loop_price - 10
- */
- do_action( 'woocommerce_after_shop_loop_item_title' );
- ?>
- </a>
- <?php
- /**
- * woocommerce_after_shop_loop_item hook
- *
- * @hooked woocommerce_template_loop_add_to_cart - 10
- */
- do_action( 'woocommerce_after_shop_loop_item' );
- ?>
- </li>
- <?php endwhile; ?>
- <!-- end of the loop -->
- <!-- pagination here -->
- <?php wp_reset_postdata(); ?>
- <?php else : ?>
- <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
- <?php endif; ?>
- </ul>
- <?php
- woo_loop_before();
- if (have_posts()) { $count = 0;
- while (have_posts()) { the_post(); $count++;
- woo_get_template_part( 'content', 'page' ); // Get the page content template file, contextually.
- }
- }
- woo_loop_after();
- ?>
- </section><!-- /#main -->
- <?php woo_main_after(); ?>
- <?php get_sidebar(); ?>
- </div><!-- /#main-sidebar-container -->
- <?php get_sidebar( 'alt' ); ?>
- </div><!-- /#content -->
- <?php woo_content_after(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement