November 15, 2019 - Latest Version 2.8.0 - Changelog

Okay
  Print

Displaying Different Views for Desktop and Mobile Devices

This article will show you how to display two different views one for Desktop and one for Mobile device.
Simply open your theme functions.php file (Remember to back it up first) and on the bottom paste this code:

add_action('stec_after_html', function() {
    ?>
    <script type="text/javascript">
        (function ($) {
            // config vars
            var mobileView = 'grid';
            var normalView = 'agenda';
            $.stecExtend(function (master) {
                
                if (master.helper.isMobile()) {
                    // Mobile device default view
                    master.glob.options.view = mobileView;
                } else {
                    // Normal
                    master.glob.options.view = normalView;
                }
                master.layout.set();
            });
        })(window.jQuery);
    </script>
    <?php
});

To change the mobile view just edit this line: var mobileView = 'week';

And for Desktop this one: var normalView = 'month';