Plugin Directory

mPress Image Refresh

Show a fresh image on every page load.

Advanced Usage

The [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: [mpress_image_refresh post_id="19"]

  • 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: [mpress_image_refresh size="full"]

  • class - Set a custom class on your image using this attribute so you can apply custom styling. Example: [mpress_image_refresh class="fresh-image"]

  • 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.

Requires: 3.2 or higher
Compatible up to: 3.4.2
Last Updated: 2012-11-11
Downloads: 261

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1
100,1,1