My clients love the monthly view of The Events Calendar on laptops & desktops, but it displays terribly on phones. In an earlier forum post, I found a solution but do not know how to implement it. I want to force display of the list view on mobile only. Can you give me very specific instruction about what to do and where to do it? Even the programmer I work with couldn’t figure out where to put the following, which was a solution I found in a forum:
Truth Seeker
Posts: 15
Topics: 17
Andrea September 1, 2014 Permalink
Is there an option to have the default view set to View as Calendar for all devices, except for mobile view? The List view on my iPhone looks great but client wants calendar view on desktop. Thanks! PS: Site under construction at http://www.celestialbirth.com/newsite
Bearded
Support Ginger
Posts: 90
Josh September 2, 2014 Permalink
Hey Andrea,
Thanks for reaching out to us!
You should be able to accomplish the desired effect by using the “wp_is_mobile()” conditional to check whether the current visitor is viewing from a mobile device. If so, you could then redirect the user to the List view by using the following function “tribe_get_listview_link”
An example of what this might look like would be:
if( wp_is_mobile() ) {
wp_safe_redirect( tribe_get_listview_link() );
}
Let me know if this helps.