Hi Brook
Thanks for your reply, sorry I’m a bit late. It would seem that I have to create a filter in my functions.php file to override the arrow type, filters are not my strong point.
I’m using this code snippet that I found elsewhere in the forum, which gets me where I need to be, but actually it’s too complex. I’d rather keep the default behaviour rather than have it continuously scroll though months when there are no events.
Is there a simpler way to filter the tribe_events_the_next_month_link without loosing the default behaviour?
Thanks
/**
* Allows visitors to page forward/backwards in any direction within month view
* an "infinite" number of times (ie, outwith the populated range of months).
*/
class MonthViewPagination {
public function __construct() {
add_filter( 'tribe_events_the_next_month_link', array( $this, 'next_month' ) );
add_filter( 'tribe_events_the_previous_month_link', array( $this, 'previous_month' ) );
}
public function next_month() {
$url = tribe_get_next_month_link();
$text = tribe_get_next_month_text();
$date = TribeEvents::instance()->nextMonth( tribe_get_month_view_date() );
return '<a data-month="' . $date . '" href="' . $url . '" rel="next">' . $text . ' <span>→</span></a>';
}
public function previous_month() {
$url = tribe_get_previous_month_link();
$text = tribe_get_previous_month_text();
$date = TribeEvents::instance()->previousMonth( tribe_get_month_view_date() );
return '<a data-month="' . $date . '" href="' . $url . '" rel="prev"><span>←</span> ' . $text . ' </a>';
}
}
new MonthViewPagination;