[rtmedia_gallery global="false" context="post" context_id="23" media_type="photo" media_author="1"]
Default is FALSE. If set to TRUE, context, context_id, album_id, author_id will be ignored. Only media_type value will be processed.
The context from which the media should be listed:
a post_type (post, page, event, topic, reply, etc)
a BuddyPress Component (activity, profile, group)
a custom context, registered via code
If not provided, the current post type is assumed as the context. If BuddyPress is installed, the context is assumed to be the component on the current page. If bbPress is installed and user is on a forum, the context is set to the current topic or reply.
id of the current post_type (post, page, event, topic, reply, etc)
id of the current BuddyPress Component (activity, profile, group)
id of a custom context, registered via code
This provides the unique id of the context. For custom contexts, the database table and the id column have to be registered via code.
If not specified, all media types will be loaded (except albums).
If media uploaded by a particular user needs to be displayed, set the user ID here.
If media uploaded to a particular album needs to be displayed, set the album ID here.
before : uploader on top of gallery
after : uploader at the end of gallery
true : uploader at the end of gallery (alias for after)
To show the uploader along with the gallery, use this uploader attribute with above values. Default is FALSE.
Set this option to a value greater than 0 to override admin settings to show number of media in gallery.
Set this option to FALSE, if you have enabled Use lightbox to display media from rtMedia admin settings and do not want to show media of gallery shortcode in lightbox.
Set this option to FALSE, if you do not want to show media title in gallery shortcode. Default value is TRUE.
By default rtMedia Pro provides sort options to sort media by Title, Upload Date and Media Size. More sorting option like sort by views, likes, comments and rate has been added for media gallery rendered via gallery shortcode.
Note: This option is available in rtMedia Pro only.
You can use
sort_parameters parameter in gallery shortcode and can specify sort options.
Use following shortcode to provide view and like sort options:
[rtmedia_gallery global=true sort_parameters="view,like"]
Use following shortcode to provide view, like and rate sort options:
[rtmedia_gallery global=true sort_parameters="view,like,rate"]
Following are the allowed values for
sort_parameters. Use comma separated values for multiple sort options.
new: Sort media based on Uploaded Date
view: Sort media based on Most Viewed
like: Sort media based on Most Liked
comment: Sort media based on Most Commented
rate: Sort media based on Most Rated
[rtmedia_gallery attribute_slug="slug-of-attribute" term_slug="terms-slug"]
attribute_slug: is the slug of attributes which is created or generated when you create a attribute.
term_slug: is the slug of terms which are created under the attributes. We can use a number of terms associate under the same attribute in single short-code. The terms must be comma separated.
As the above screenshots show, the short-code of attributes will look as follows:
[rtmedia_gallery attribute_slug="rtcamp" term_slug="services,product"]
xxx: the id of favlist which is created.
Note that the purpose of this shortcode is to provide a simpler way to display public _galleries of media content on your site.
For safety of your users,
rtmedia_gallery will always fetch public content only. Some intended side-effects include:
Uploads in private buddypress groups will not show even if a user can access by going to that particular buddypress-group
Uploads for buddypress-profiles, limited to friends or logged-in users will not show up even if viewer can access them directly by going to a user profile.
Idea is to protect privacy by default.