GD > Post Images

All Widgets come as Widgets, Shortcodes or Blocks. Learn more about our Super Duper Widgets.

The Post Images widget outputs images from any image custom field. Some features include;

  • Output a single image
  • Output multiple images as an image gallery grid.
  • Output multiple images as a slider.
  • Lazyload (ajax) all images for improved page load speed.
  • Open images in a lightbox.
  • Show multiple image custom fields in the one output.
  • Set fallback images from the default category image or more.
  • Use any URL custom field to generate a screenshot of that URL for inclusion on the output.
  • Use any VIDEO custom field (youtube) to generate a screenshot of that Video for inclusion on the output.

The MultiRatings and Reviews Extension adds the ability for users to add images to reviews, these uploaded images can be output by this widget also.

Widget Options

Some settings for this widget are advanced settings, reveal them by clicking the button next to save.

  • Title - The widget title.
  • Output Type - Select the output type;
    • Single Image - Loads one image.
    • Slider - Load images in a flex slider which is mobile responsive and touch-enabled for swipe.
    • Gallery - Load images in a 4 image grid system.
  • Load via Ajax - This will load al images apart from the first slider image via AJAX for faster load times.
  • Auto start - (slider specific) Set the slider to auto start sliding.
  • Show title - (slider specific) Show the image title (if set) over the image.
  • Show caption - (slider specific) Show the image caption (if set) over the image.
  • Animation - (slider specific) Set the animation for the slider; slide or fade.
  • Control Navigation - (slider specific) Set control navigation below the slider. Options are;
    • Default - Bulletpoint selects.
    • Thumbnails - This will load the thumbnail images (not AJAX compatible) that users can see and select the preview.
    • None - No bottom control navigation.
  • Link to - Set if the images have links, options are; none, post or lightbox image.
  • Show logo (deprecated) -  Use types below to show the listing logo first if uploaded.
  • Image types - Comma separated list of image types (by key) to show. Defaults to: post_images.
    • Image fields - Any image input field can be used. eg:  post_images,logo,header_image
    • URL Screenshot - Any URL field can be used to generate a screenshot, if your field key is "url" just add "_screenshot" to it eg: url_screenshot
    • Video Screenshot - (supports youtube URLs) Any Video or text field can be used to generate a screenshot, if your field key is "video" just add "_screenshot" to it eg:video_screenshot. 
    • Review Images - (requires ratings manager extension) You can add images uploaded by users by using the key: comment_images
  • Fallback types - Comma separated list of fallback types to show if post has no specified images (only one will be shown). Defaults to: logo,cat_default,cpt_default,listing_default.
  • Image size - You can set a specific WP image size. All images are output as responsive sizes so this option is rarely needed.
  • Image limit - Limit the number of images returned.
  • Show limit - Limit the number of images shown. This can be used to output 1-2 images in a gallery and if linked to lightbox it can ajax load more images when in a lightbox. This can also be used to turn the slider into a carousel and will set the default visible images.
  • Image cover type - This is how the image should cover the image viewport. You can give priority to height, width or to show the whole image, the default is to cover which looks best but can clip the edges of images.
  • Extra class - Give the wrapper an extra class so you can style things as you want.

Example Output

Single Image

Slider

Slider (with thumbnail control nav)

Gallery

How to Set Video Screenshot as Post Image?

It is possible to show a video using the GD > Post Images widget, and in case the listing doesn't have a video, it can automatically show the featured image instead. 

You'd simply need to set the first image to be "video_screenshot,post_images" and then, make sure "Show advanced is set" and set the limit to 1, and then paste the link to your screenshot. This will show a screenshot of the video and show it in a popup if clicked, and if no video exists then it will show the featured image.

Image Types

types has a default value of:

post_images, logo, comment_images,website_screenshot

If you choose to add another File Upload field that accepts images, you can also display that new image field with the same GD Pose Images widget; just add the field key into the list.

To do that, add all the keys, onec for each image field that you want to load and in the order that you want them loaded.

For example, if you made a new field "Product Image" with a key product image, you can add that image to the main GD Post Image widget by adding the key to a list like:
post_images,product_image

Another example, you can make an additional 'Gallery' File Upload field with key 'gallery'. To display that field. you can simply set the key in the image types: gallery

Fallback Types

fallback_types has a default value of:

logo, cat_default_cpt_default_listing_default

Fallback images show when the field is empty. Only the first listed fallback type to have a value will show.

Each of these is a specific type of default that you can set in the GeoDirectory settings

cat_default

Set the category default image in the category edit screen, for example:
WP Admin - Places - Place Categories - Choose a category to edit - add category default image

cpt_default

Set the CPT default image in the CPT settings page. For example:
WP Admin - Places - Settings - General - Show advanced - Default image

listing_default

Set the listing default image in the GeoDirectory general settings
WP Admin - GeoDirectory - Settings - Default Image

No fallback = 0

In the case that you do not want any fallback image types to show when the field is empty then set a 0 in the fallback types setting.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us