Adds the [wpgalleryimage] shortcode for inserting into a post or a page one of the images you uploaded into your WordPress gallery.
| Author: | David Potter (profile at wordpress.org) |
| WordPress version required: | 2.5 |
| WordPress version tested: | 2.8.5 |
| Plugin version: | 1.1 |
| Added to WordPress repository: | 17-11-2009 |
| Last updated: | 24-11-2009
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
| Rating, %: | 0 |
| Rated by: | 0 |
| Plugin URI: | http://dpotter.net/Technical/wordpress/wp-plu... |
| Total downloads: | 3 485 |
| Active installs: | 10+ |
![]() Click to start download |
|
Lets you add an image to a post or page from the WordPress gallery on your site using a shortcode. Simply add the wppgalleryimage shortcode and specify the image you want to add by name or ID.
When you insert an image using the built-in WordPress editor, the full URL to the image on your site is inserted into the page or post. Using the shortcode, all you need to specify is the name or ID of the image and the URL is generated automatically.
When an image is uploaded to the gallery, the file is stored under wp-content/uploads and metadata about the image is stored in the wp_posts table with a post_type of attachment. The image is added to post or page within a <div> tag that specifies the wpgalleryimage_shortcode class, which allows you to define a style for all images added by the shortcode.
Parameters
id - The ID of the image in the
wp_poststable.name - The name of the image from the
post_namefield in thewp_poststable. The name must match exactly.title - The titlee of the image from the
post_titlefield in thewp_poststable. The title must match exactly.size - The size of the image. This value is passed to the
wp_get_attachment_imagefunction. Valid values include:thumbnail(default)mediumlargefull
width and height - The width and height of the image to display. The most appropriate image file will be used to display the image. Both must be specified or they will be ignored. If these parameters are specified, the size parameter is ignored.
float - How to float the image on the page. Valid values include:
none(default)leftright
link - The URL to link to when the image is clicked on. You can also specify
fullto link to the full-size image.padding, paddingtop, paddingright, paddingbottom, paddingleft - The amount of padding around the image. If floating left, defaults to
10pxon the right. If floating right, defaults to10pxon the left.
Examples
[wpgalleryimage id="19"]
[wpgalleryimage name="my-logo"]
[wpgalleryimage title="My Logo"]
[wpgalleryimage name="my-logo" size="medium"]
[wpgalleryimage name="my-logo" width="100" height="100"]
[wpgalleryimage name="my-logo" float="right"]
[wpgalleryimage name="my-logo" link="full"]
[wpgalleryimage name="my-logo" link="http://www.example.com/"]
[wpgalleryimage name="my-logo" paddingbottom="10px"]
FAQ
ChangeLog
