Viewing 3 replies - 1 through 3 (of 3 total)
  • I am having the same issue. Did you find a solution for this ksweck?

    Thread Starter ksweck

    (@ksweck)

    Alas, no. I needed to get it done, so I used a different solution – embedded a google calendar!

    Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi folks,

    If you do not have any events in those future months, there will not be a link to go to them. We removed those to make searching easier and prevent issues with Google Analytics. If you want to add them back in, you can use the following 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No link to next month in calendar view’ is closed to new replies.