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 | |
add_filter('storefront_before_header', function() { | |
echo 'Hello'; | |
}); |
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 | |
// Hooking into the storefront_product_categories_args hook | |
add_filter( 'storefront_product_categories_args', 'marce_filter_homepage_product_categories_storefront', 11 ); | |
// We're changing the values of limit, columns, and title for the Product Categories homepage section. | |
function marce_filter_homepage_product_categories_storefront( $args ) { | |
$args['limit'] = 1; | |
$args['columns'] = 4; | |
$args['title'] = 'Shop Categories'; |
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 | |
add_filter( 'woocommerce_get_image_size_gallery_thumbnail', function( $size ) { | |
return array( | |
'width' => 400, | |
'height' => 400, | |
'crop' => 1, | |
); | |
} ); |
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 | |
add_filter( 'woocommerce_get_image_size_thumbnail', function( $size ) { | |
return array( | |
'width' => 500, | |
'height' => 500, | |
'crop' => 1, | |
); | |
} ); |
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 | |
add_filter( 'woocommerce_get_image_size_single', function( $size ) { | |
return array( | |
'width' => 500, | |
'height' => 500, | |
'crop' => 1, | |
); | |
} ); |
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 | |
add_filter( 'woocommerce_get_image_size_single', function( $size ) { | |
return array( | |
'width' => 400, | |
'height' => '', | |
'crop' => 0, | |
); | |
} ); |
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 | |
add_theme_support( 'woocommerce', apply_filters( 'storefront_woocommerce_args', array( | |
'single_image_width' => 416, | |
'thumbnail_image_width' => 324, | |
'product_grid' => array( | |
'default_columns' => 3, | |
'default_rows' => 4, | |
'min_columns' => 1, | |
'max_columns' => 6, | |
'min_rows' => 1 |
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 | |
add_theme_support( 'woocommerce', array( | |
'thumbnail_image_width' => 250, | |
'single_image_width' => 350, | |
) ); | |
} |
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 | |
/** | |
* Remove relative URLs for WooCommerce product images | |
*/ | |
add_filter( 'woocommerce_product_get_image', function( $url, $product, $size, $attr, $placeholder, $image ) { | |
return $image; | |
}, 10, 6 ); | |