• Resolved jprouty

    (@jprouty)


    Good afternoon,

    In your knowledgebase ( https://theeventscalendar.com/knowledgebase/admin-roles-and-permissions/ ), it says that I can customize permissions for events using the Members plugin. I’ve done this to hide event descriptions from certain roles, so that unqualified users see the event post like this:

    Birthday Party
    May 13 @ 9:00 am – 11:00 pm
    Sorry, but you do not have permission to view this content

    see example post here

    However, when viewing the calendar, the event description that is supposed to be hidden is visible to everybody in tooltips, mobile, day, and list view. Is there any way to use role permissions to hide event descriptions for the calendar?
    For now I’ve disabled day and list view and commented out <!--<div class="tribe-event-description">[[=raw excerpt]]</div>--> from tooltip.php and mobile.php. I don’t know how to hide the description in day or list view. This isn’t an ideal solution, as it takes away all event descriptions rather than just the ones I want to keep private.

    Note that I want everybody to be able to see event titles and times, just not certain event descriptions.

    I’d appreciate any help or suggestions you can offer. Thanks,
    Janet

    My site calendar
    My Plugins: The Events Calendar Version 4.5.2.1, Members Version 1.1.3

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Andras Guseo

    (@aguseo)

    Hey @jprouty,

    Thanks for reaching out!
    Although providing that kind of technical support here in the .org forums is beyond the support we can provide, I might be able to get you started.

    First, I would do a template override for those 2 files. Here’s a guide for that.

    Then you could use the <?php current_user_can( $capability , $object_id ); ?> function (link) to either display the selected part of code or not.

    I hope this helps, let me know.
    Cheers,
    Andras

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Permissions for viewing event descriptions’ is closed to new replies.