Current month without events & template hooks
-
Hi!
I came across the guide at https://theeventscalendar.com/knowledgebase/template-hooks/
What caught my attention was the last example described there:
add_action( 'tribe_template_before_include:events/v2/components/events-bar/views', function( $file, $name, $template ) {
echo '<a href="#">My Link</a>';
}, 10, 3 );This works, but there appears to be a catch (not sure I’d dare call it a bug just yet, may well be the intended behaviour). It appears that the function does not run if one is looking at the current month that has no events. However, if to use the datepicker and navigate to a month that has no events, it runs just fine. It also works with the current month, if there are events in it. In my case, month is the only view used.
I’ve tried hooking to other templates as well. No luck. Where to hook to have the code run at all times (i.e with or without events in the view)?
Thanks in advance
- You must be logged in to reply to this topic.