Created
June 25, 2014 16:12
-
-
Save woogist/df9d532dde14766179c5 to your computer and use it in GitHub Desktop.
Statua theme - fixes the warning division by zero error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php global $woo_options; ?> | |
<?php if ( !isset($woo_options[ 'woo_homepage_layout_choice' ]) ) { get_template_part( 'layouts/home-layout-error' ); | |
} elseif ( is_home() && ( $woo_options[ 'woo_homepage_layout_choice' ] == '0' ) ) { get_template_part( 'layouts/home-layout-error' ); | |
} else { ?> | |
<?php if ( $woo_options[ 'woo_homepage_layout_choice' ] == 'A' && is_home() && !is_paged() ) get_template_part( 'layouts/home-layout-a' ); ?> | |
<?php if ( $woo_options[ 'woo_homepage_layout_choice' ] == 'B' && is_home() && !is_paged() ) get_template_part( 'layouts/home-layout-b' ); ?> | |
<?php if ( $woo_options[ 'woo_homepage_layout_choice' ] == 'C' && is_home() && !is_paged() ) get_template_part( 'layouts/home-layout-c' ); ?> | |
<?php } ?> | |
<?php | |
if ( is_woocommerce_activated() && $woo_options[ 'woo_homepage_featured_products' ] == "true" ) { | |
echo '<div id="main" class="col-full">'; | |
echo '<h2>'.__('Featured Products', 'woothemes').'</h2>'; | |
$featuredproductsperpage = $woo_options['woo_homepage_featured_products_perpage']; | |
echo do_shortcode('[featured_products per_page="'.$featuredproductsperpage.'" columns="4"]'); | |
echo '</div>'; | |
} | |
?> | |
<?php get_template_part( 'layouts/home-layout-blog-sidebar' ); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment