Show a fresh image on every page load.
[mpress_image_refresh] shortcode supports a few attributes to give you more control over the results:
post_id - You can pass in the post ID to pull attached images from. If your images are attached to another post, just provide the ID of that post and we will pull those images instead. Example:
size - By default, we use the 'large' image size defined by WordPress. However, you can use the other built-in image sizes ( 'thumbnail', 'medium', 'full' ) or any custom image sizes you have defined. Example:
class - Set a custom class on your image using this attribute so you can apply custom styling. Example:
not - Sometimes you have an image within the page content, and as such it is automatically attached to the page or post. You probably don't want these images to be used as one of your random images, so just pass in the ID of those images to keep those from showing up. Example:
[mpress_image_refresh not="2310, 2319"]
Keep in mind that any of these attributes can be combined as needed. Example:
[mpress_image_refresh post_id="19" size="full" not="2310"]. Also, keep in mind that the shortcode can be used in text widgets. However, you will probably want to define the post_id attribute when using the shortcode in a text widget.