Custom message when gallery requires email
One of the many options you can configure with Sunshine Photo Cart galleries is to define an Access Type with one of those options being to require an email address before seeing images. With the following custom code snippet, you can show a custom message to your users whenever a user is requested to enter their email address.
add_action( 'sunshine_single_gallery', 'sunshine_custom_email_required_message' );
function sunshine_custom_email_required_message( $gallery = '' ) {
if ( SPC()->frontend->is_gallery() && SPC()->frontend->current_gallery->email_required() ) {
echo '<p>Put your custom message here.</p>';
}
}
Learn how to add this custom code to your WordPress website
Still need help?
If you have not yet found your answer in the documentation articles, please contact support