Add CSS only on the Shop page
change .xxx to the specific CSS element you want to change
.archive.post-type-archive-product.woocommerce .xxx {
background-color: pink;
}
Increase Your PHP Memory
Add this to wp-config.php
// Increase PHP Memory as recommended by Woocommerce
define( ‘WP_MEMORY_LIMIT’, ’64M’ );
Move WooCommerce Product Tabs under Product Summary
Add this to functions.php
// Remove tabs from the original location
remove_action( ‘woocommerce_after_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 10 );
// Insert tabs under Product Summary
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_output_product_data_tabs’, 60 );
Remove sidebar from Woocommerce
Remove this from wp-content/plugins/woocommerce/single-product.php
<?php
/**
* woocommerce_sidebar hook
* @hooked woocommerce_get_sidebar – 10
*/
do_action(‘woocommerce_sidebar’);
?>
Remove this from wp-content/plugins/woocommerce/archive-product.php
<?php
/**
* woocommerce_sidebar hook
* @hooked woocommerce_get_sidebar – 10
*/
do_action(‘woocommerce_sidebar’);
?>
Add this to style.css
#content-woocommerce {
width:100%;
}
Change the number of Woocommerce related products and columns
Add this to functions.php
<?php
/**
* Change number of related products on product page
* Set your own value for ‘posts_per_page’
*/
function woo_related_products_limit() {
global $product;
$args[‘posts_per_page’] = 6;
return $args;
}
add_filter( ‘woocommerce_output_related_products_args’, ‘jk_related_products_args’ );
function jk_related_products_args( $args ) {
$args[‘posts_per_page’] = 3; // 3 related products
$args[‘columns’] = 3; // arranged in 3 columns
return $args;
}
Remove Woocommerce checkout fields
// Woo remove checkout fields
Require Woocommerce checkout fields
Field names for Woocommerce checkout
billing_first_name
billing_last_name
billing_company
billing_country
billing_address_1
billing_address_2
billing_city
billing_state
billing_postcode
billing_phone
billing_email
Shipping Fields
shipping_first_name
shipping_last_name
shipping_company
shipping_country
shipping_address_1
shipping_address_2
shipping_city
shipping_state
shipping_postcode
Order Fields
order_comments