Event Calendar Pro – Calendar Privacy/Security? Part 2

Home Forums Calendar Products Events Calendar PRO Event Calendar Pro – Calendar Privacy/Security? Part 2

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1015702
    Kimberlee
    Participant

    Please see original post at: https://theeventscalendar.com/support/forums/topic/evp-calendar-privacysecurity/#dl_post-1010526

    My webguy followed these specific steps to stop non-users from seeing the Event Calendar…

    – Make sure the calendar is using ‘Default Events Template’ in ‘WP-Admin > Events > Settings > Display > Events template’.
    – Create a folder named ‘tribe-events’ in you theme folder ‘wp-content/themes/your_theme/’.
    – Make a copy of the file ‘default-template.php’ located at ‘wp-content/plugins/the-events-calendar/src/views/’.
    – Drop the copied file into the ‘tribe-events’ folder you just created in your theme.
    – Edit the copy of ‘default-template.php’ like shown below:


    if ( ! defined( ‘ABSPATH’ ) ) {
    die( ‘-1’ );
    }

    // add these lines
    if ( !is_user_logged_in() ) {
    wp_redirect( wp_login_url( get_permalink() ) );
    exit;
    }

    get_header();

    Unfortunately it took the Event Calendar off the website completely. Even logged in users wouldn’t have been able to see the Events Calendar. You could click the Events tab, and it would redirect you to the Log In page, but once you logged in, the Events Calendar was nowhere to be seen. Please help!

    #1015905
    Josh
    Participant

    Hey Kimberlee,

    Thanks for following up on this one.

    When adding the code, the last line is “…”, when adding does your template have the “…” verbatim or does it include the rest of the default template content that comes after. If it doesn’t include the rest of the code, then there will be nothing to display on the events page.

    Let me know if this helps.

    Thanks!

    #1016159
    Kimberlee
    Participant

    This reply is private.

    #1016496
    Josh
    Participant

    Hey Kimberlee,

    Visiting the calendar link I’m redirected properly to the login page, however I do see that it has a command in the URL to redirect to a specific event. You can address this by removing the “get_permalink()” from within the login form function and adding in ‘/events’ (be sure to include the “‘” when adding there).

    Let me know if this helps.

    Thanks!

    #1022109
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Event Calendar Pro – Calendar Privacy/Security? Part 2’ is closed to new replies.