The size of a listing logo depends on which block shows it. GD > Post Images lets you choose the image size, the link and the aspect ratio. GD > Post Meta, which shows most custom fields, outputs image files at the WordPress medium size and links them to a lightbox.
Show the logo with GD > Post Images
Set Image types to logo so the block shows only the logo, then set the size and link:
[gd_post_images type='image' types='logo' fallback_types='0' image_size='full' link_to='' aspect='n']
- Image size: any image size registered on your site, such as thumbnail, medium, large or full.
- Link to: None, Post or Lightbox image. Leave it empty for no link.
- Aspect ratio: “No ratio (natural)” keeps the logo’s own proportions.
- Fallback types:
0stops the block showing a default image when a listing has no logo.
You can use this in the Details page template, the archive item template or any other GeoDirectory page. How to resize GD Post Images covers sizes in more detail.
Keep GD > Post Meta and change the size
If you show the logo with GD > Post Meta, for example to keep its icon and label, change the size with the geodir_cf_file_output_image_params filter. This snippet uses the full size image for logos only:
add_filter( 'geodir_cf_file_output_image_params', 'my_gd_logo_image_size', 10, 2 );
function my_gd_logo_image_size( $params, $file ) {
if ( ! empty( $file->type ) && 'logo' === $file->type ) {
$params['size'] = 'full';
}
return $params;
}
Add it with the Code Snippets plugin or your child theme’s functions.php. GD > Post Meta always links image files to the lightbox, so if you don’t want the link, use GD > Post Images instead.
Older uploads
WordPress creates each image size when the file is uploaded. If you add a new size, existing logos only get it after their thumbnails are regenerated, which you can do with Regenerate Thumbnails in GeoDirectory > Status > Tools.