I want to display user's post uploaded images on their profile page


#1

I would like my users profile pages to display all of the images that they’ve posted to ANY of the posts on the website. According to this: https://rtcamp.com/blog/getting-ready-for-rtmedia/ this should be possible:

Syncing with WordPress and plugins. Media uploaded elsewhere on a site, can also be displayed on a group or profile. For eg, say you have installed an events plugin that works via a custom post type. You can add the rtMedia anywhere uploader via shortcodes or template tags. All the images that the user’s upload here can be then displayed on the same event page, on the user profile (say under a tab called Event photos, with the current event as an album) and in a group (dedicated for the event).

The bolded text above is what I want to do. How is this done? I haven’t found it in the documents. As a side issue, it has also been suggested in your documents that “custom tabs” can be added. (as in “Events” mentioned above) Again, I am having difficulty finding the documentation for this.

Please advise. Thank you.


#2

Hi @Dan_Braun,

You need to override BuddyPress templates in your theme and need to add rtmedia gallery shortcode in member profile template.

For Example below is the sample code to display all images of current logged in user:

<?php echo do_shortcode('[rtmedia_gallery global=true media_author='.get_current_user_id().']'); ?>

#3

I need to brush up on the BP template tags, but I’ve created some successful tests with your help. Thank you!


#4

Hi @Dan_Braun,

You are welcome !


#5