GeoDirectory has a ready made Company Logo field. Add it to your post type, then show the logo on the listing page with the GD > Post Images block or widget.
Add the logo field
- Go to Places > Settings > Custom Fields (use your own post type’s menu if it isn’t Places).
- Under Predefined Fields, click Company Logo.
- Check the labels, then save. Keep the field key as
logo: GeoDirectory and some add-ons look for that key.
Listing owners can now upload a logo on the add listing form, and you can add one when editing a listing in the backend.
Show the logo on the listing page
Uploading the logo stores it with the listing, but nothing displays it until you add it to a template. Edit your Details page template (the page set at GeoDirectory > Settings > General > Pages) or your listing sidebar and add GD > Post Images with Image types set to logo:
[gd_post_images types="logo" type="image" image_size="medium"]
To show the logo on listing cards, add the same block to your Archive item template.
The logo is also a fallback image. When a listing has no photos, GD > Post Images shows its logo by default, before the category or post type default image.
The logo shows but looks wrong
If the logo is there but cropped or squashed, it’s a styling issue. Try a larger image size such as image_size="full", or give the block an extra class and adjust it with CSS:
[gd_post_images types="logo" type="image" css_class="gd-logo"]
.gd-logo img {
object-fit: contain;
max-height: 120px;
}
See GD > Post Images for all the options, and How to fix logo size issues in map bubbles if the logo also appears on the map.