Advertisement
Guest User

TEC Post 3.7 - Show Future Months with no events Post

a guest
Aug 19th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. To show future months even with no events after 3.7 in The Events Calendar.
  2.  
  3. move this file to your theme: the-events-calendar\views\month\nav.php
  4.  
  5. Rename tribe_events_the_next_month_link(); to custom_tribe_events_the_next_month_link();
  6.  
  7. Place this function in your Theme's Function.php
  8. /**
  9. * Display an html link to the next month. Used in the month navigation.
  10. *
  11. * @return void
  12. * @author Jessica Yazbek
  13. * @uses tribe_get_next_month_text()
  14. * @since 3.0
  15. **/
  16. function custom_tribe_events_the_next_month_link() {
  17. $url = tribe_get_next_month_link();
  18. try {
  19. $date = TribeEvents::instance()->nextMonth( tribe_get_month_view_date() );
  20. $text = tribe_get_next_month_text();
  21. $html = '<a data-month="'. $date .'" href="' . $url . '" rel="next">'. $text .' <span>&raquo;</span></a>';
  22. } catch ( OverflowException $e ) {
  23. $html = '';
  24. }
  25. echo apply_filters('custom_tribe_events_the_next_month_link', $html);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement