Week View in Desktop – List View in Mobile

Home Forums Calendar Products Events Calendar PRO Week View in Desktop – List View in Mobile

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #991313
    Irene
    Participant

    Hi,

    I read several posts on this forum and Tried all suggestions, but none worked.

    The one in this post did at least something.
    https://theeventscalendar.com/support/forums/topic/forcing-list-view-on-mobile-only/

    /*
    * 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();
    	}
    }

    I replaced tribe_is_month() with tribe_is_week() but I get an error 404 on my mobile.

    What to do now?

    #991415
    Geoff
    Member

    Hi Irene, welcome back to the forums!

    I gave the snippet a try myself and got a 404 as well. I was able to fix it up by first making sure I was updated to the latest versions of both plugins (3.11.1) and then heading to Settings > Permalinks from the WordPress dashboard, then clicking the “Save Changes” button without changing anything. Does that work for you as well?

    Thanks!
    Geoff

    #991435
    Irene
    Participant

    Hi Geoff,

    nope, I have still the same error. I tried also to change my permalinks settings back to default but… no go!

    Cheers!
    Irene

    #991442
    Geoff
    Member

    Shoot, I was hoping the same thing that worked for me would work for you as well–sorry about that!

    Just to cover our bases, will you please run through the suggestions outlined here to see if any other 404 troubeshooting will clean things up?

    Thanks!
    Geoff

    #991460
    Irene
    Participant

    Ok, Geoff, I did all the steps.

    Of course when I activated the default theme I saw the week view because the function is in the child of my theme. F.y.i I’m using U-Design, I don’t know if there are known issues with that.

    When I switched back to U-design without any other plugins activated than Event calendar, the error was back.

    I think that is handy for you to know that I have another issue going on, also in the function of my child theme. Please give a look

    https://theeventscalendar.com/support/forums/topic/different-date-ranges-for-different-views/#post-991413

    I’m grateful for any other suggestion

    Thank you for your efforts.
    Irene

    #991577
    Geoff
    Member

    Oh weird! I wonder if the customizations in both places are conflicting with one another.

    Just to be sure, will you please try switching to the Twenty Fifteen theme and inputting just this snippet in functions file? You may need to try the same permalinks tactic we tried the first time around once you do that.

    Thanks!
    Geoff

    #991663
    Irene
    Participant

    No go! Even without plugins.

    After a little research I saw that te function events_get_listview_link is deprecated in the technical documents.

    Look at this link: https://theeventscalendar.com/plugin/the-events-calendar/

    Unfortunately they don’t say what to use instead and I’m not good enough to figure it out myself.

    I’m desperate, I love this plugin but I need to get it right on mobile.

    Thanks

    #991729
    Geoff
    Member

    Good eye! I missed that deprecated function the first time around and should definitely have spotted it–nice work!

    Try using this instead: tribe_get_listview_link()

    That’s the current function for getting the current list view link.

    Geoff

    #996026
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Week View in Desktop – List View in Mobile’ is closed to new replies.