Created
May 21, 2015 17:53
-
-
Save jesseeproductions/fc21ce52314f31dc230b to your computer and use it in GitHub Desktop.
The Events Calendar - Redirect Mobile Users to List View
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The Events Calendar - Redirect Mobile Users to List View | |
* @version 3.9 | |
* | |
* @link http://theeventscalendar.com/support/forums/topic/forcing-list-view-on-mobile-only/ | |
*/ | |
add_action( 'template_redirect', 'tec_mobile_template_redirect' ); | |
function tec_mobile_template_redirect() { | |
if( tribe_is_month() && wp_is_mobile() ) { | |
wp_redirect( tribe_get_listview_link() ); | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment