Erik

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: "events_get_listview_link" leads to "Page Not Found" #1067673
    Erik
    Participant

    Hi Cliff,

    The “tribe_get_listview_link()” didn’t work since listview was not activated in the calendar settings. This resolves my main question but I still have one minor detailed that you might give me a suggestion for…

    Since I had to activate the listview, the view-menu/dropdown now appears. Thats fine, but in my mobile view the script prevents users to accually choose the calendar view. I therefore would like it to be hidden in mobile view. How might I acchive that?

    Thanks for your support.

    /Erik

    in reply to: "events_get_listview_link" leads to "Page Not Found" #1067453
    Erik
    Participant

    Hi Cliff,

    Thanks for your suggestion. I have added your code-snippet but still no change.

    When I, for testing, use a common “wp_redirect( ‘http://www.google.se/’ );” in the snippet, the user is correctly redirected in mobile mode and not in desktop This must mean that the “wp_is_mobile” is working correctly. In other words, I belive it’s the “tribe_get_listview_link()” that does not work as expected.

    /Erik

    in reply to: "events_get_listview_link" leads to "Page Not Found" #1067423
    Erik
    Participant

    Hi Cliff,

    Unfortunately it doesnt work with tribe_get_listview_link() either. I missed to mention that that was the redirect I initialy tried to use.

    This is what the code looks like right now in my functions.php:

    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() );
    //wp_redirect( ‘http://www.google.se/’ );
    exit();
    }
    }

    And this is the URL (with the “page not found” in mobile):

    http://www.delsbo.org/events/

    /Erik

Viewing 3 posts - 1 through 3 (of 3 total)