Frequently Asked Question

Customize Listing Image Sizes
Last Updated 5 years ago

As of version 14.5 of the Automotive Listings plugin we've included a new WordPress filter that can be used to customize the size of thumbnails generated to fit in different areas of the plugin. Below is an example of how to use the filter to alter the sizes of images found in the plugin. You can place this code in a child theme functions.php in order to change the image size:
function custom_automotive_image_size_filter($sizes){
  // change the size of the vehicle scroller thumbnails
  $sizes['width']  = 167;
  $sizes['height'] = 119;

  // change the size of inventory thumbnails
  $sizes['listing']['width']  = 200;
  $sizes['listing']['height'] = 150;

  // change the size of the single listing slider
  $sizes['slider']['width']  = 762;
  $sizes['slider']['height'] = 456;

  return $sizes;
add_filter('automotive_image_sizes', 'custom_automotive_image_size_filter');

If you change the size of these images you will need to use a plugin like Regenerate Thumbnails to re-create the existing listings with the new image sizes.

Also note that you may need to use custom CSS to position or style the new image sizes correctly which is beyond the scope of support.

Please Wait!

Please wait... it will take a second!