Displaying Posts Without Images – Default images and posts without images

show_noimage_posts

When this setting is false, the widget only retrieves posts with featured images. When true, all posts will be retrieved whether or not a featured image is set.

show_noimage_posts is a true/false value that defaults to false. When true, posts without images will be loaded. Posts without images can be displayed with or without a default image. You will normally want to display a caption or an excerpt if not including a default image.

Include posts without images. The WordPress default image for thumbnails is loaded by default.

[featured_image_pro  show_noimage_posts=true showcaptions=true]

Include posts without images, set the width & height. The default image is automatically loaded and set to 150 x 150

[featured_image_pro show_noimage_posts=true imagewidth="150px" imageheight="150px" imageheight="150px"]

defaultimage

the path to a default image.

defaults to the image located in wp_includes/media/default.png in your root wordpress directory. Keep in mind that this is a thumbnail image. Override this field with a fixed path or use the defaultimageid to load an image from the media library with all media library sizes available.

Override the default image with an href link.

[featured_image_pro show_noimage_posts=true posts_per_page=20 imagewidth="150px" imageheight="150px" defaultimage="http://plugins.protoframework.com/featured-image-pro/wp-content/uploads/sites/2/2016/11/coffee.jpg"]

defaultimageid

The id of an image in the media library. Click on the image in the media library. In the address bar, you should see something like this: http://local.wordpress.dev/wp-admin/post.php?post=8266&action=edit

Use the default image from the media library when the post has no image

[featured_image_pro show_noimage_posts=true defaultimageid='8879'  showcaptions=true posts_per_page=20]

usedefaultimage

Set usedefaultimage to false to display no image at all for posts that do not have a featured image. For text only masonry items, you must set itemwidth and optionally captionheight or excerpt height depending on what is displayed. Make sure that you include captions and/or excerpts when you turn this option on, otherwise nothing will display.

itemwidth

A css Style Value that sets the width of the grid item. If there are no images and itemwidth is not set, masonry items will overlap when no default image is displayed.

Display some items without images and with an item width.

[featured_image_pro show_noimage_posts=true showcaptions=true defaultimage='' itemwidth='300px' border-1 excerpt=true excerpthr=false]

Leave a Reply

Your email address will not be published. Required fields are marked *