Modify EC Full Page

This topic contains 3 replies, has 2 voices, and was last updated by  Stephen Harris 8 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23561

    So, I have our station calendar on a page:

    http://portal.alphamediatopeka.com/calendar/

    Is there a filter/hook for the calendar?

    For example, when you click on any of the items in the calendar, it takes you to a page for that item.

    Can I change that? When the visitor is NOT logged in, I don’t want it to link to anything.

    When the user IS logged in, I want to link to an edit page for the event.

    Dave Navarro
    #23568

    Yes there is: http://codex.wp-event-organiser.com/hook-eventorganiser_calendar_event_link.html

    But you may find issues because the calendar is cached. The cache key is based on the query array, so you may want to add a key/value pair ‘flag’ so you have different query array, and so cache key, if the user is logged-in or out.

    That query can be filtered here: https://github.com/stephenharris/Event-Organiser/blob/7af70b8594c257aa6f79cd152cfcdf3240b7c52c/includes/event-organiser-ajax.php#L86

    Stephen Harris
    #23691

    That worked, thanks!

    Is there any way to make the clicked link open in a new page instead of the current page?

    Dave Navarro
    #23703

    Hi Dave,

    I’m afraid not – except in that you can use JavaScript to listen for a click and open it in the window. (The library used to create the calendar does not provide a means to edit the HTML mark-up of the link and add a target attribute.)

    Stephen Harris
Viewing 4 posts - 1 through 4 (of 4 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.