EVP – Calendar Privacy/Security?

Home Forums Calendar Products Events Calendar PRO EVP – Calendar Privacy/Security?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1010315
    Kimberlee
    Participant

    Hello,

    I have paid for Events Calendar Pro, and Community Events. However, I need my Events Calendar to be Private, only to be seen by registered members who are logged in to the website. Right now, anyone who stumbles across my website can view the calendar. I do not want my Events Calendar page/content to be searchable by Google, either. About a year ago, this was possible. There was a “widget” to “protect” your calendar. Now, after the update, my “website guy” is telling me this can’t be done (the widget is broken and no replacement is available). Why? There has to be other websites that want/need/require a Private calendar for “members only”. I desperately need some kind of code to set my Events Calendar as Private. Mind you, I an NOT TECH SAVVY, so I will need to relay (copy & paste) any info to my website guy. I need my calendar secured. Please help! Thank you!

    #1010526
    Nico
    Member

    Howdy Kimberlee,

    Welcome to our support forums and thanks for reaching out to us. Hopefully I can help you with this!

    First of all I’m not sure about the widget your ‘website guy’ mentioned. Anyway, the simplest way to achieve this would be to add a ‘logged in’ check in the default events template (a page that holds all event related view). To achieve this you’ll need to perform a template override of said template, I’ll outline the process to do so below but be sure to check our Themer’s guide for details on the process. Here we go:

    – 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();
    ...

    That should prevent non-logged in users to view any page of the calendar and will automatically redirect them to the login page.

    Please let me know if you can manage to implement this tweak,
    Best,
    Nico

    #1015249
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘EVP – Calendar Privacy/Security?’ is closed to new replies.