My gallery requires the viewer to login and with the older version of WPG2 and wp-gallery2.php, I made a manual link in the header that would either point to wp-gallery2.php if the user was logged in or point to "/wp-login.php?redirect_to=/wp-gallery2.php" if they weren't.
I would like to replicate this scheme with the latest WPG2 3.0.2 which uses a page to view the gallery. If a user who hasn't logged in clicks on the wpg2 page they get redirected back to the index page again.
Would I make a page template in WP to accomplish thing?
Thanks
Posts: 492
I think you'll have to add some code to the existing page template in wpg2template.inc. Basically do a check for logged-in user at the top. Something like
I don't have time to track down the actual WP code for that conditional check right now, but it should be fairly straight forward.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 6
Sweet..I was looking in that file..just had to add "&& is_user_logged_in()" and then added my redirection code and it works like a charm.
Thanks