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 active theme functions.php file and at the bottom paste following code:

add_action('wp_footer', function() {
    global $post;
    if (!is_a($post, 'WP_Post') || !has_shortcode($post->post_content, 'stachethemes_ec')) {
    <script type="text/javascript">
        (function ($) {
            $(function () {
                if (typeof $.stecExtend === 'undefined') {
                // config vars
                var mobileView = 'grid';
                var normalView = 'agenda';
                $.stecExtend(function (m) {
                    m.glob.options.view = m.helper.isMobile() ? mobileView : normalView; 

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

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