WPSlash Licences

How to Change Default WooFood Accordion Thumbnail Size

How to Change Default WooFood Accordion Thumbnail Size – code snippet guide from WPSlash
Published
Updated
Reading time
1 minutes
Written by
WPSlash team

Hi, If you customised with CSS the style of product displayed within accordion of WooFood you will probably must also change the default thumbnail of 60px*60px in size to an other. For example to full or large to avoid stretching a 60*60 pixels image.

Copy the following snippet to your functions.php on your child theme.

Code
add_filter('woofood_accordion_image_size', 'wpslash_change_accordion_image_hook', 10, 1);

function wpslash_change_accordion_image_hook($default)
{
return 'full';
}

Extra Tip

If you want to view all the additional image sizes WordPress having available on your site you can get it like the following example which will display all the additional images sizes on your footer.

Don’t forget to remove the code after getting the list of additional image sizes.

Code
add_action("wp_footer", function()
{
global $_wp_additional_image_sizes; 
print '<pre>'; 
print_r( $_wp_additional_image_sizes ); 
print '</pre>';
});
All guides

FoodMaster (formerly WooFood)12 min read

Best Store Address Setup for Pickup

Compare single-address, multi-location, and directions-first pickup setups to reduce wrong-door visits and simplify checkout.

The plugins these guides are about

FoodMaster for restaurants, courier vouchers for the Greek market, marketplace sync and store tools, all for WooCommerce.

Browse plugins30-day money-back on every plugin