global $options;
if(is_singular( 'product' ) && isset($options['related_col']) && $options['related_col']==3) {
add_filter('body_class', 'wpcom_woo_body_class');
}else if(!is_singular( 'product' ) && isset($options['shop_list_col']) && $options['shop_list_col']==3){
add_filter('body_class', 'wpcom_woo_body_class');
}
get_header();
if( !is_singular( 'product' ) ) {
$is_sidebar = isset($options['shop_list_sidebar']) ? $options['shop_list_sidebar'] : 0;
if( is_tax() ){
$term = get_queried_object();
$banner = get_term_meta( $term->term_id, 'wpcom_banner', true );
$banner = !$banner && isset($options['shop_banner']) ? $options['shop_banner'] : $banner;
}else{
$banner = isset($options['shop_banner']) ? $options['shop_banner'] : '';
}
if( $banner ) {
$banner_height = isset($term) ? get_term_meta( $term->term_id, 'wpcom_banner_height', true ) : '';
$text_color = isset($term) ? get_term_meta( $term->term_id, 'wpcom_text_color', true ) : '';
$bHeight = intval($banner_height ? $banner_height : ($options['shop_banner_height']?$options['shop_banner_height']:300) );
$bColor = ($text_color ? $text_color : ($options['shop_banner_color']?$options['shop_banner_color']:0)) ? ' banner-white' : '';
?>
} else {
$is_sidebar = isset($options['shop_single_sidebar']) ? $options['shop_single_sidebar'] : 0;
} ?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史