'600', // px 'height' => '600', // px 'crop' => 1 // true ); $single = array( 'width' => '600', // px 'height' => '600', // px 'crop' => 1 // true ); $thumbnail = array( 'width' => '600', // px 'height' => '600', // px 'crop' => 0 // false ); // Image sizes update_option( 'shop_catalog_image_size', $catalog ); // Product category thumbs update_option( 'shop_single_image_size', $single ); // Single product image update_option( 'shop_thumbnail_image_size', $thumbnail ); // Image gallery thumbs } //Custom Hooking for Product Loop Page Items. function aldehyde_before_wc_title() { echo "
"; } add_action('woocommerce_before_shop_loop_item_title', 'aldehyde_before_wc_title', 15); function aldehyde_after_wc_title() { echo "
"; } add_action('woocommerce_after_shop_loop_item_title', 'aldehyde_after_wc_title'); /** * Remove the "shop" title on the main shop page */ function aldehyde_woo_hide_page_title() { return false; } add_filter( 'woocommerce_show_page_title' , 'aldehyde_woo_hide_page_title' ); /** * Change the Breadcrumb */ add_filter( 'woocommerce_breadcrumb_defaults', 'aldehyde_change_breadcrumb_delimiter' ); function aldehyde_change_breadcrumb_delimiter( $defaults ) { // Change the breadcrumb delimeter from '/' to '>>' $defaults['delimiter'] = ' '; return $defaults; } /* * WooCommerce Output Wrappers for for Single Product(single-product.php) and Product Archives(archive-product.php) */ add_action('woocommerce_before_main_content', 'aldehyde_single_custom_header', 1 ); function aldehyde_single_custom_header() { if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
"; } /** * WooCommerce Extra Feature * -------------------------- * * Change number of related products on product page * Set your own value for 'posts_per_page' * */ add_filter( 'woocommerce_output_related_products_args', 'aldehyde_change_related_products_count' ); function aldehyde_change_related_products_count( $args ) { $args['posts_per_page'] = 3; $args['columns'] = 3; return $args; } //Product Gallery Size function aldehyde_gallery_four_columns( ){ return 4; } add_filter( 'woocommerce_product_thumbnails_columns', 'aldehyde_gallery_four_columns'); // Change number or products per row to 3 add_filter('loop_shop_columns', 'loop_columns'); if (!function_exists('loop_columns')) { function loop_columns() { $i = get_theme_mod('aldehyde_woo_layout',3); return $i; // 3 products per row } } add_filter( 'loop_shop_per_page', create_function( '$cols', 'return '.get_theme_mod("aldehyde_woo_qty", 12).';' ), 20 ); // Ensure cart contents update when products are added to the cart via AJAX (place the following in functions.php) add_filter( 'woocommerce_add_to_cart_fragments', 'aldehyde_header_add_to_cart_fragment' ); function aldehyde_header_add_to_cart_fragment( $fragments ) { ob_start(); ?>
cart->cart_contents_count, 'aldehyde'), WC()->cart->cart_contents_count);?>