Help with resizing of featured images on WooCommerce homepage

WooCommerces css is pretty specific so it can be quite tricky to override it sometimes. To override their css you need to be MORE specific with your css. So an example would be: @media only screen and (min-width: 768px) { div.home-intro ul.featured-products li:nth-child(4n), div.home-intro ul.featured-products li.fourth { width: 20%; margin-top: 0; } } In the … Read more

Visual Composer creating own shortcodes with vc_map() to return simple Image

Visual Composer adds the image ID to the generated shortcode. This gives you more flexibility with image sizes. You can use it like this: $imageSrc = wp_get_attachment_image_src($image_url, ‘thumbnail’); if( $imageSrc ) { echo ‘<img src=”‘ . $imageSrc[0] . ‘” />’; } The thumbnail param could be replaced by medium or another valid image size. The … Read more

Resize image to specific dimension (X to Y ratio)

If the last parameter $crop is true, then »images will be cropped to the specified dimensions using center positions«, with »(…) an array can specify positioning of the crop area« – this is generally called hard crop. But you have to make sure that the images are big enough to actually crop the size you … Read more