Is there a way to display related photos under the photo post being viewed? The post with the links like: http://mywebsite.com/members/johnsmith/media/545/
You can try using Attributes Short-Code for what you need, but you need to modify single media template as per your requirement.
Please refer this documentation for more details : http://docs.rtcamp.com/rtmedia/features/shortcodes/gallery-shortcode/.
How would i add it in that php file though?
You can manually call shortcode using do_shortcode function.
echo do_shortcode( ‘[ your shortcode]’ );
I tried it and all I keep getting is "Sorry !! There’s no media found for the request !! " no matter what attribute I put in there. Please help
Can you please once explain your exact requirement? Also provide us the current shortcode you are using right now so that we can help you with that.
this is the shortcode I pasted:
“<?php echo do_shortcode('[rtmedia_gallery global="false" context="activity"]') ?>” .
Basically what I’d like to do is under single media, show about 3 random related media(media type, tags, etc), sort of like this:
That example is from blog post but I’d like to do that with activities instead of blog posts. Thank you
Unfortunately, there is not any option to display related media to activity feed as activity does not contain any option to add tag/attribute to media while posting. It will be pretty complicated way and will require good customization work too!
doesn’t have to be specifically “related media”, just a gallery of 3 to 4 photos pulling up random media from any the same user will do. Given the rtmedia has a gallery shortcode, I suppose its possible, right?
We can point out right direction for this. For fetching random 3 media uploaded by current logged in user per activity post, you need to follow below steps.
You need to use BuddyPress’ hook ‘bp_activity_posted_update’ to get activity content. As we have also used this hook in rtMedia to append media to activity content, you need to get updated content from the BuddyPress’ activity table using lower priority value. We have called this hook on priority value 99, so you can use bigger value to call this hook let say 199.
Once you get updated content from BuddyPress’ table, fetch random images of current logged in user. You can query to ‘***get()***’ method of ‘RTMediaModel.php’ class.
Once you get random media, simply append them to updated content you have got in step 1.
Save modified content back to the BuddyPress’ table.
Hope this helps you.
I must admit that this is beyond my comprehension…
My goal was to be able to display more activities/media when a user sees one. But after the last update, it seems like rtmedia got rid of the title bar that lead to a single-media page so I can’t even use that anymore.