WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Sidebar widget - hiding events from unregistered users (2 posts)

  1. ptb-uml
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to hide events from unregistered users on this site and it doesn't seem to be working. I'm using the tutorial from the plugin site, but when I'm logged out, I still see the events in the sidebar. (I'm using the WP Members plugin to hide events on pages and posts.) A few questions for you:

    - Does the tutorial hide events both in the page and in the sidebar widget?

    - Step 3 says to replace line 138 in table.php - you would have to replace lines 138-139, right? Otherwise you're left with a stray line of code.

    - I replaced lines 138-139 with the code specified in the tutorial, changing "employee" to "subscriber", and also added the specified CSS to events.css. When I checked the site without being logged in, I could still see both the calendar on the page and also in the sidebar. (I fixed the former by setting the Events URL slug back to the default, rather than the project calendar page URL that the calendar resides on.)

    Any advice would be much appreciated - thanks! Btw, the plugin looks great.

    Marissa

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 1 year ago #

    Hi Marissa,

    No, the tutorial would only apply to the big calendar. To get it to apply to the widget as well you'd need to make some similar modifications. Unfortunately I cannot really guide you on that. I can tell you that to modify the widget you'll want to make a copy of /wp-content/plugins/the-events-calendar/views/events-list-load-widget-display.php and place in an 'events' folder in your theme to make changes.

    I hope that helps!

    - Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic