Thank you @barth, really helpful! I got the widget working displaying the right amount of pictures… the only thing I could not fix was the widget showing up on all pages except the buddypress user media pages. I looked at the conditionals and I don’t think there is one conditional available that only fires when viewing any “BuddyPress Media” page. I tried something like this
if ( bp_is_user() || bp_is_user() && !is_rtmedia_album() || bp_is_user() && !is_rtmedia_album_gallery() || bp_is_user() && !is_rtmedia_single() ) :
get_template_part( 'rtmedia/recent-photos' );
add_action( 'open_sidebar', 'cfc_media_widget' );
For now I’ve used some CSS to simply hide the widget (which does throw a fatal error like you mentioned). It’s not ideal but it certainly works.
It would be awesome if you’d could add a few query parameters in the plugin so making custom media loops is easier
Thanks again for the amazing plugin,