Last active
June 26, 2017 15:16
-
-
Save dajocarter/0ac3acaa1f6806de72fa7de98cd7fb12 to your computer and use it in GitHub Desktop.
WooCommerce Adjustments. Throw these in the functions.php file of your theme.
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
add_filter( 'woocommerce_enqueue_styles', 'my_woocommerce_styles' ); | |
function my_woocommerce_styles($styles){ | |
unset($styles['woocommerce-layout']); | |
unset($styles['woocommerce-smallscreen']); | |
$styles['woocommerce-layout'] = array( | |
'src' => get_template_directory_uri() . '/css/woocommerce.css', | |
'deps' => '', | |
'version' => '1.0.0', | |
'media' => 'all' | |
); | |
return $styles; | |
} |
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
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); | |
add_action('woocommerce_after_main_content', 'uptown_wrapper_end', 10); | |
function uptown_wrapper_end() { | |
echo '</div>'; | |
} |
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
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); | |
add_action('woocommerce_before_main_content', 'uptown_wrapper_start', 10); | |
function uptown_wrapper_start() { | |
echo '<div id="shop">'; | |
} |
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
add_action( 'after_setup_theme', 'woocommerce_support' ); | |
function woocommerce_support() { | |
add_theme_support( 'woocommerce' ); | |
} |
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
// Change number or products per row to 3 | |
add_filter('loop_shop_columns', 'loop_columns'); | |
if (!function_exists('loop_columns')) { | |
function loop_columns() { | |
return 3; // 3 products per row | |
} | |
} |
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
function woocommerce_result_count() { | |
return false; | |
} |
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
remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment