Gallery Shortcode

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

  1. all
  2. music
  3. video
  4. photo
  5. album

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.
  1. before : uploader on top of gallery
  2. after : uploader at the end of gallery
  3. true : uploader at the end of gallery (alias for after)

If you want to show the uploader along with the gallery, use this “uploader” attribute with above values. Default is FALSE.

Privacy Note

Please note that purpose of this shortcode is to provide a simpler way to display public galleries of media content on your site.

Hence for safety of your users, rtmedia_gallery will always fetch public content only. Some intended side-effects include:

  1. Uploads in private buddypress groups won’t show even if a user can access by going to that particular buddypress-group
  2. Uploads for buddypress-profiles, limited to friends/logged-in users won’t show up even if viewer can access them directly by going to a user profile.

Idea is to protect privacy by default.


  1. I tried this new shortcode. I get the following, “Oops !! There’s no media found for the request !!” on this page. This is a private website. Can I private message you credentials to take a look?

  2. It might help if I tell you how I would like to display media. I’m using BuddyPress. I have members on my site that upload photos (using the old BuddyMedia plugin from rtCamp). Most of these members uploaded these photos in to albums they created at time of upload on their profile > media page.

    I would like to display these photos on a static “Photos” page on my website. Is this possible using this shortcode? I have tried different variations of this shortcode without any luck so far. I get the “Oops” message or a blank page.

    Thanks for your assistance. I really like this plugin. I’m hoping I can get this new rtMedia plugin working properly.

    Thank you for your time.


  3. Please give us more samples !

    And, is it possible to show in buddypress use, the name of the author(member) of the picture? and a link to his profil-site ?

  4. Hello. I am having the same issue.

    I’m using, [rtmedia_gallery global="true" context="activity" media_type="photo"] and am trying to show all members uploaded photos. However, this only gives me the most recent members photos and when you click on page 2 you get the oops message.

  5. Yes I’m still having the same issue with loading more images. I have also noticed that the alignment of my images is off. For instance I have 4 images on the first row, and each image steps down about 40px from the next image. The page layout is off because of this and all the image names are hidden. And the gallery starts about 100px below the title of my page. Does anyone know how to control the style of the gallery images? Is this problem related to my theme style sheet? Has anyone had luck styling the rtMedia gallery page?

  6. Hey Jay. Yes, that is because there is a float: left on the li, so in your stylesheet you can change that. I changed it to display: inline-block so i’d have more control.

    .rtmedia-container .rtmedia-list .rtmedia-list-item {
    float: none!important;
    display: inline-block;
    *display: inline;
    vertical-align: top;
    margin-bottom: 20px;

    .rtmedia-container .rtmedia-item-thumbnail img {
    max-width: 150px !important;
    max-height: 150px !important;

  7. Hello,

    First of all thanks for your awesome plugin it will be really useful on my website.
    However, I have the same problem when I put the shortcode on my pages to display the media of a specific group ([rtmedia_gallery global="false" context="group" context_id="1" media_type="all"]) it says the following: Oops !! There’s no media found for the request !! but I know that there is some media.

    Thank you in advance for you help.

  8. Thanks Amanda, I will give that a try!

  9. looking at this thread, it looks like everyone is getting an ‘oops’ message (myself included), and no one knows how to fix it.
    Anyone resolve this??


  10. Nope, for my part I still have the same problem and I have no clue why it does that.

  11. If I use the following shortcodes on a page…
    Everything works.

    If I use the same shortcode on a custom post type,
    the gallery and uploader display correctly, however, when I upload a media, it does not go into the gallery.

    Ideally, I wish to use these from the template instead of the wordpress content section so I tried this…
    echo do_shortcode(‘[rtmedia_uploader]‘);
    echo do_shortcode(‘[rtmedia_gallery]‘);
    This also displays everything correctly but when I upload an image it does not go into the gallery section.

    I can only get this to work properly on wordpress pages and not posts. Maybe its because my theme has custom post types? Isn’t this plugin supposed to work with custom post types though?
    I really would like a solution as the website I am building really needs this functionality.

    If anyone knows, please help.

  12. Just reading the documentation above….
    Can someone please tell me how to register a custom context and a context ID in the code?
    I need these shortcodes to work with custom post types.
    Please help

  13. have added the shortcode to uplaod media but cant find the media upoad button :(

    • Staff

      There is no upload media button. You simply need to drag and drop media(photos/video) into the uploader, or click the Select button to choose the desired media.

      Next, the media will appear in the logged in user’s activity feed in BuddyPress. If you want the media to appear on a post, use the [rtmedia_gallery] shortcode along with [rtmedia_uploader].

  14. I would really like help resolving the OOPS issue when the gallery shortcode is used. I have a buddypress site where each member can upload a video. On the home page I want a video player where the videos are shown. I can not get this shortcode to work no matter what options I try. I am using [rtmedia_gallery global="true" media_type="video"] and I get a strange error on the page. It shows
    “media_type= ” in a box then ” type=”hidden” />
    Media Gallery

    I would love a solution to this problem. It appears there are lots of others having similar issues.

    Oops !! There's no media found for the request !!

    • Staff

      I have used the same shortcode [rtmedia_gallery global="true" media_type='video'] on our test site and its working fine without an issue. Can you please show me the screenshot or website url where exactly having the same issue.

      • For some reason it now works. I do have a question though. Right now it is just showing a grid of the videos as an icon. It that what it is supposed to do? I would like it to play the videos or at least show a still frame from the videos. Is that possible?

        • Staff

          @Carol – It should be possible with the latest version. Also it will really be appreciated if you could post your queries on our support forum ->

          • My question was not answered — what is the gallery supposed to look like? Is is a grid of icons or an actual video?

            As far as your comment on the support forum – I was just asking the same questions others had asked here hoping to help them all. I can’t see how to add a new topic.

  15. Staff

    @clamoreaux – The gallery by default should show a grid of video icons. Incase you are using our audio/video encoding service or our rtMedia FFMPEG addon, then it would show the video thumbnails instead of the video icon. It doesn’t show the actual video unless you click on it.

    To create a new topic you would need to login and then go to this link ->

  16. I use the new Shortcode for displaying all the media on my site but is getting the Oops !! There’s no media found for the request !! Please advise.

    Debug info
    Home URL
    Site URL
    PHP 5.2.17
    MYSQL 5.5.32
    WordPress 3.6.1
    BuddyPress 1.8.1
    rtMedia 3.1.6
    OS Linux
    Imagick Not Installed
    GD bundled (2.0.34 compatible)
    [php.ini] post_max_size 50M
    [php.ini] upload_max_filesize 50M
    [php.ini] memory_limit 256M
    Installed Plugins Admin Bar Disabler by Scott Kingsley Clark version 1.0.3,
    AdRotate by Arnan de Gans of AJdG Solutions version 3.8.8,
    All-in-One Event Calendar by Timely by Timely Network Inc version 1.10-standard,
    All in One Video Pack by Kaltura version 2.5,
    Better Delete Revision by Galerio & Urda version 1.2,
    BuddyPress Activity Plus by Ve Bailovity (Incsub), designed by Brett Sirianni (The Edge) version 1.5,
    BuddyPress Like by Alex Hempton-Smith version 0.0.8,
    rtMedia for WordPress, BuddyPress and bbPress by rtCamp version 3.1.6,
    BuddyPress by The BuddyPress Community version 1.8.1,
    Cool fade popup by Gopi.R version 7.1,
    Custom Headers and Footers by Daniel Frużyński version 1.2,
    Easy Contact Forms by version 1.4.7,
    Exclude Pages from Navigation by Simon Wheatley version 1.92,
    Get page IDs by Ionut Staicu version 1.0.1,
    Image Widget by Modern Tribe, Inc. version 4.0.8,
    Members by Justin Tadlock version 0.2.2,
    Search Everything by Dan Cameron of Sprout Venture version 7,
    Shareaholic | share buttons, analytics, related content by Shareaholic version,
    Ultimate Maintenance Mode by SeedProd version 1.5.2,
    Ustream by Ustream, Inc. version 1.0.6,
    WangGuard by WangGuard version 1.5.10,
    WassUp Real Time Analytics by Michele Marcucci, Helene Duncker version,
    Wordpress Facebook Like Plugin by AJ Batac version 0.7,
    WP-Activity by Dric version 2.0,
    WP Audio Player by Tom McFarlin version 1.9.1,
    WP-Polls by Lester ‘GaMerZ’ Chan version 2.63,
    WP Sliding Login | Register Panel by Kyle Powning @ The Factory version 2.3,
    WP Super Cache by Donncha O Caoimh version 1.3.2
    Theme Name Night Club
    Theme Version 2.0
    Author URL
    Template Overrides plugins/buddypress-media/templates/media/lbum-gallery-item.php,
    Total Albums 9
    Total Musics 8
    Total Photos 28
    Total Videos 1

  17. Hi There,
    First of all thanks for this great plugin !
    I’d like to create some pages to display all my medias by type …
    Which means i’d like to have a “Videos” page which displays all videos set as public by users …
    Sorry for my poor english and thanks to find me a way to do that ;)

  18. Hi, is there any change to do, my galeries ‘re brocken for now (once upgraded from 3.3 to 3.4) ?

    I’m using basic shortcode like [ rtmedia_gallery global="true" media_type="photo" ] then “Oops !! There’s no media found for the request !!” is displayed

  19. Afternoon all !
    I am using [rtmedia_gallery global="false" uploader="true"]
    I dont get anything in this gallery after succesful upload of documents
    Is it because i have to add the context id? if yes, then
    how to get the page id?

  20. Hi,

    I wonder if you can set a limit the shortcode for showing pictures. Something like below..
    [rtmedia_gallery global="true" max='30' media_type='photo']

    Best Regards

    • Staff

      Thanks for suggestion, I have created issue for the same

      • Great! :)

        For otherwise it is dependent of the max nr of the settings of how many pictures per user. Which it not good if you want different values. For example 10 for pictures per user upload and 30 for show of as overall in the whole community as shortcode.

        Another suggestion is to a add a button to the pictures for fullscreen. If you have galleries you want to see a picture in fullscreen without the comment section for a better user experience. To see details or whatever you want to. I suggest a little icon in the top right the picture. where x is placed.

        Best Regards
        Thank you!

Comments are closed on this article.
Please use free our support forum for support and discussions.

People Who Like Thisx