Create a Gallery


#1

How can I create and add a gallery with rtMedia to a wordpress page that is visible for every registered user?


#2

Hello @so3,

Yes, you need to add custom code in template page and then assign it to WordPress pages. Create one custom template page where you can first check if the user is logged-in or not using is_user_logged_in(). If user is logged-in then use do_shortcode to list media.

Here is the sample code:

if ( is_user_logged_in() ) {
echo do_shortcode('[rtmedia_gallery global=true]');
}

For more details on template pages you can refer this documentation : https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/

Thank you.


#3

Thanks! now I can add a gallery.

But is it possible to display only uploaded images from the admin and not the users? I wanted to set the privacy for every user to “private” and they shouldn’t be able to change it. Only the admin should be able to upload public images.


#4

Hello @so3,

If you only want to allow admin to upload media then you can once visit rtMedia WordPress Sitewide Gallery

I hope it satisfies your requirement.

Thank you.


#5