/** * is_store_notice_showing - Returns true when store notice is active. * @return bool */ function is_store_notice_showing() { return 'no' !== get_option( 'woocommerce_demo_store' ); } } if ( ! function_exists( 'is_filtered' ) ) { /** * is_filtered - Returns true when filtering products using layered nav or price sliders. * @return bool */ function is_filtered() { global $_chosen_attributes; return apply_filters( 'woocommerce_is_filtered', ( sizeof( $_chosen_attributes ) > 0 || isset( $_GET['max_price'] ) || isset( $_GET['min_price'] ) ) ); } } if ( ! function_exists( 'taxonomy_is_product_attribute' ) ) { /** * Returns true when the passed taxonomy name is a product attribute. * @uses $wc_product_attributes global which stores taxonomy names upon registration * @param string $name of the attribute * @return bool */ function taxonomy_is_product_attribute( $name ) { global $wc_product_attributes; return taxonomy_exists( $name ) && array_key_exists( $name, (array) $wc_product_attributes ); } } if ( ! function_exists( 'meta_is_product_attribute' ) ) {
function woocommerce_product_subcategories( $args = array() ) { global $wp_query; $defaults = array( 'before' => '', 'after' => '', 'force_display' => false ); $args = wp_parse_args( $args, $defaults ); extract( $args ); // Main query only if ( ! is_main_query() && ! $force_display ) { return; } // Don't show when filtering, searching or when on page > 1 and ensure we're on a product archive if ( is_search() || is_filtered() || is_paged() || ( ! is_product_category() && ! is_shop() ) ) { return; } // Check categories are enabled if ( is_shop() && '' === get_option( 'woocommerce_shop_page_display' ) ) { return; } // Find the category + category parent, if applicable $term = get_queried_object(); $parent_id = empty( $term->term_id ) ? 0 : $term->term_id; if ( is_product_category() ) { $display_type = get_woocommerce_term_meta( $term->term_id, 'display_type', true ); switch ( $display_type ) { case 'products' : return; break; case '' :
echo get_the_password_form(); return; } get_template_part( 'includes/woocommerce/loop/single' ); } // end of the loop. } else { ?> <?php if ( have_posts() ) { ?> <div class="clearfix m-bot-30 inline-block"> <?php do_action('woocommerce_before_shop_loop'); ?> </div> <?php woocommerce_product_loop_start(); woocommerce_product_subcategories(); while ( have_posts() ) { the_post(); get_template_part( 'includes/woocommerce/loop/archive' ); } // end of the loop. woocommerce_product_loop_end(); do_action('woocommerce_after_shop_loop'); } elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) { wc_get_template( 'loop/no-products-found.php' ); } }; }
<?php if ( is_singular( 'product' ) ) { ?> <h4 class="text-uppercase"><?php the_title(); ?></h4> <?php } else { ?> <h4 class="text-uppercase"><?php woocommerce_page_title(); ?></h4> <?php } ?> <?php } ?> <?php if ( function_exists('massive_breadcrumbs') ) massive_breadcrumbs(); ?> </div> </section> <section class="body-content"> <div class="page-content product-grid"> <div class="<?php echo esc_attr( $container ); ?>"> <div class="row"> <div class="<?php echo esc_attr( $column['main'] ); ?>"> <?php if ( is_page() ) { the_content(); } else { woocommerce_content(); } ?> </div> <?php if ( $sidebar !== 'no-sidebar' ) { ?> <div class="<?php echo esc_attr( $column['sidebar'] ); ?>"> <?php /** * woocommerce_sidebar hook * @hooked woocommerce_get_sidebar - 10 */ do_action( 'woocommerce_sidebar' ); ?> </div> <?php } ?> </div> <!-- .row --> </div> <!-- .container --> </div> <!-- page content --> </section> <!-- body content -->
elseif ( is_single() && $template = get_single_template() ) : elseif ( is_page() && $template = get_page_template() ) : elseif ( is_singular() && $template = get_singular_template() ) : elseif ( is_category() && $template = get_category_template() ) : elseif ( is_tag() && $template = get_tag_template() ) : elseif ( is_author() && $template = get_author_template() ) : elseif ( is_date() && $template = get_date_template() ) : elseif ( is_archive() && $template = get_archive_template() ) : else : $template = get_index_template(); endif; /** * Filters the path of the current template before including it. * * @since 3.0.0 * * @param string $template The path of the template to include. */ if ( $template = apply_filters( 'template_include', $template ) ) { include( $template ); } elseif ( current_user_can( 'switch_themes' ) ) { $theme = wp_get_theme(); if ( $theme->errors() ) { wp_die( $theme->errors() ); } } return; endif;
<?php /** * Loads the WordPress environment and template. * * @package WordPress */ if ( !isset($wp_did_header) ) { $wp_did_header = true; // Load the WordPress library. require_once( dirname(__FILE__) . '/wp-load.php' ); // Set up the WordPress query. wp(); // Load the theme template. require_once( ABSPATH . WPINC . '/template-loader.php' ); }
<?php /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define('WP_USE_THEMES', true); /** Loads the WordPress Environment and Template */ require dirname(__FILE__).'/cms/wp-blog-header.php';