Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi byronj,

    Thanks for your post. If you don’t have any events in the future, the Next Events link won’t show. We did that to reduce confusion when people are searching for events.

    If you’d like to add them back in even when there are no future events, you can use this snippet:

    /**
     * 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 ContinualMonthViewPagination {
        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>&raquo;</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>&laquo;</span> ' . $text . ' </a>';
        }
    }
    
    new ContinualMonthViewPagination;

    Best,
    Leah

    Thread Starter byronj

    (@byronj)

    Sorry for the late response, but that was exactly what i was looking for.

    Thanks man!

    Brook

    (@brook-tribe)

    Thanks for the update byronj. GOod to know that worked!

    – BRook

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Next link missing on October month view’ is closed to new replies.