<?php get_template_part('parts/bread-crumbs'); ?>
</div>
<main class="page-inside woocommerce">
-
+
<div id="content-wrapper" class='side-shadow woocommerce-wrapper'>
<div class="row">
<?php if ( ! is_product_tag() && ! is_product_category()) { ?>
<?php } ?>
<?php if (is_shop()) { ?>
<div class="small-12 large-9 columns main woo-tags">
-
+
<?php
/**
* woocommerce_before_main_content hook
<small class="product_category_title_item"><?php echo $single_cat->name; ?></small>
- <?php
+ <?php
}
}
add_action( 'woocommerce_after_shop_loop_item_title', 'wc_category_title_archive_products', 5 );
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
<?php endif; ?>
-
- <?php woocommerce_content();?>
+
+ <?php woocommerce_content();?>
<?php do_action( 'woocommerce_archive_description' ); ?>
if ( $product_cats && ! is_wp_error ( $product_cats ) ){
$single_cat = array_shift( $product_cats );
-
+
// Set name to the default first picked category (however WC decides that)
$primaryCatName = $single_cat->name;
-
+
// Try to get the Primary Category based on how Yoast SEO has set it in the postmeta table
global $wpdb;
$sqlGetPrimary = "SELECT meta_value
FROM $wpdb->postmeta
WHERE
- (meta_key = '_yoast_wpseo_primary_product_cat' AND post_id = '". get_the_id() ."');
+ (meta_key = '_yoast_wpseo_primary_product_cat' AND post_id = %d);
";
- $primaryCatID = $wpdb->get_var($wpdb->prepare($sqlGetPrimary));
+ $primaryCatID = $wpdb->get_var(
+ $wpdb->prepare(
+ $sqlGetPrimary,
+ get_the_id()
+ )
+ );
$term = get_term_by( 'id', $primaryCatID, 'product_cat' );
-
+
// Use the primary category instead if it's valid
if( $term->name ) {
$primaryCatName = $term->name;
}
?>
-
- <small class="product_category_title_item"><?php echo $primaryCatName; ?></small>
-
+
+ <small class="product_category_title_item"><?php echo $primaryCatName; ?></small>
+
<?php }
}
add_action( 'woocommerce_after_shop_loop_item_title', 'wc_category_title_archive_products', 5 );
$columns = 3;
return $columns;
}
- }
+ }
?>
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
</div>
<?php } else if (is_product()) { ?>
<div class="small-12 large-9 columns main woo-single-product">
- <?php
- if(function_exists('pf_show_link')){echo pf_show_link();}
+ <?php
+ if(function_exists('pf_show_link')){echo pf_show_link();}
?>
<?php
/**
</div>
<?php get_footer(); ?>
<script>
-
+
$(document).ready(function () {
$("#tab-html5_video p").remove();
var mainImage = $(".attachment-shop_single.size-shop_single.wp-post-image");
// Thumbnail undisplay
$(thumbImage).mouseout(function(){
$(mainImage).attr("srcset", $(mainImage).attr("src"));
- });
-
+ });
+
});
-</script>
\ No newline at end of file
+</script>