Skip Popover on Event Click

Depending on your use case, you might want your users to go straight to the single post for an event when clicking it on the front-end calendar, instead of displaying the Pie Calendar popover.

To achieve this requires the following PHP code snippet:

add_action( 'piecal_additional_event_click_js', 'piecal_skip_popover' ); 

function piecal_skip_popover() {
?>
Alpine.store('calendarEngine').showPopover = false;
window.location.href = Alpine.store('calendarEngine').eventUrl ?? Alpine.store('calendarEngine').permalink;
<?php
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.