Post widget
What it does: Lets you insert one or more posts or images, with the option of making the the whole thing into a link.
Set up with: Custom Field left-0-post
, right-0-post
etc, or shortcode_post
.
Parameters: The values shown are examples only.
ids = 20
(REQUIRED)
style=basic
(optional)
link=/about
(optional)
show_title=true
(optional) default = false
pic_size=medium
(optional) default = full
Notes: The link
option really only makes sense applied to a single post. Extremely useful for creating graphic links to other pages on site.
The ids
parameter is plural because you can also enter a comma-separated list of post IDs, which will then be displayed in the same order. These can be either Posts or Attachments from the Media Library (eg: photos) – WordPress thinks of all of these as different kinds of Posts.
To find the style
options available on your site, examine the existing page extras.
By default the post title is suppressed – you certainly don’t want it for photos, where it’s usually the filename. If you want to show it, set show_title = true
.
The pic_size
parameter only applies to attachments (eg: photos). The usual available values are: thumbnail
, small
, medium
, large
and full
– although this varies from site to site, and sizes greater than the original upload (full
) will be unavailable.
When placing an attachment (photo), if there’s a line starting credits=
in the Description field of the attachment, this will be used to drop a small camera icon in the bottom right corner of the image. This displays the credit line when moused over – and if the credit line is a link, clicking the camera will open it (eg: a Flickr page) in a new window. This facility means that it may be preferable to include most photos using the Post widget rather than placing them directly into the editing panel. Most free photos still require attribution of some sort, and this is probably the easiest way of satisfying the requirements.
Shorthand option: As well as being able to omit the order number and use left-post
, right-post
etc (which will be interpreted as left-0-post
, right-0-post
), this widget also allows the omission of ids=
when there are no other parameters involved. So custom field values of 36
or 786,52,905
will be treated as IDs. These shorthands do not apply to the shortcode version.
Required: