We have a membership site with events for members and nonmembers.
If I have Require login for all events? enabled then no one can view the event details without logging in.
On the event details page under the section Registration Details could we then show the must login prompt, You are not logged in.
Before you can reserve a spot, you must register.
If you are a returning user please Login
This way everyone could see the event and know they need to login or register. If they are logged in they can proceed as usual.
This can be changed with a bit of PHP template hacking. If you look in the /templates/registration_page.php template near the end you’ll find this code:
//If enough spaces exist then show the form
//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {
event_espresso_user_login();
} else {
//Serve up the registration form
if ( empty( $path ) ) {
require( $template_name );
} else {
require( $path );
}
}
This can be changed to:
//If enough spaces exist then show the form
//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {
?>
<div class="event_description clearfix">
<p class="section-title">
<?php _e('Description:', 'event_espresso') ?>
</p>
<?php echo espresso_format_content($event_desc); //Code to show the actual description. The WordPress function "wpautop" adds formatting to your description. ?>
</div>
<?php
event_espresso_user_login();
} else {
//Serve up the registration form
if ( empty( $path ) ) {
require( $template_name );
} else {
require( $path );
}
}
The support post ‘View events when Required is enabled’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.