WordPress Gallery code overview:
As we all know, wordpress provides an inbuilt gallery feature, which can be used by inserting a gallery shortcode only. There are several option that you can customize this gallery.
You can use these options in following manner:
Lets have a look at these options:
You can specify the number of columns to display. For example:
specify the post ID. The gallery will display images which are attached to that post. The default behavior if no ID is specified is to display images attached to the current post.
specify the image size to use for the thumbnail display. Valid values include “thumbnail”, “medium”, “large” and “full”. The default is “thumbnail”.
specify the sort order used to display thumbnails. The default is “menu_order ASC, ID ASC”.
the name of the XHTML tag used to enclose each item in the gallery. The default is “dl”.
the name of the XHTML tag used to enclose each thumbnail icon in the gallery. The default is “dt”.
the name of the XHTML tag used to enclose each caption. The default is “dd”. For example, to change the gallery markup to use div, span and p tags:
you can set it to “file” so each image will link to the image file. The default value links to the attachment’s permalink.