Calendar view not appearing on mobile. Page just reloads list view

Home Forums Calendar Products Events Calendar PRO Calendar view not appearing on mobile. Page just reloads list view

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1407796
    progress-festival
    Participant

    Hi,
    I am using Events Calendar Pro. I have set the default view to calendar with the option to also select the list view from the drop-down. It works fine on desktop but on mobile it just reloads the list view. I can’t get to the calendar at all.

    I have added css to the Avada theme to tweak the single event page style and have also edited the function.php to change the text displayed at the top of the page (for example: instead of saying “Events for February 1-xxxx” it just reads Progress Schedule. I also added code to force the calendar to display starting February 2018 (since this is a festival and that is the only time we have events.)

    I suspect one of these actions are causing the page not too load in mobile but I don’t know what to change to fix it…or maybe it’s not even this. This is the code in fucntions.php

    /*
    * Alters event's archive titles
    */
    function tribe_alter_event_archive_titles ( $original_recipe_title, $depth ) {
    // Modify the titles here
    // Some of these include %1$s and %2$s, these will be replaced with relevant dates
    $title_upcoming = 'Progress Festival'; // List View: Upcoming events
    $title_past = 'Past Events'; // List view: Past events
    $title_range = 'Schedule for Progress Festival'; // List view: range of dates being viewed
    $title_month = 'Schedule for Progress Festival'; // Month View
    $title_day = 'Schedule for %1$s'; // Day View, %1$s = the day
    $title_all = 'All events for %s'; // showing all recurrences of an event, %s = event title
    $title_week = 'Schedule for week of %s'; // Week view
    // Don't modify anything below this unless you know what it does
    global $wp_query;
    $tribe_ecp = Tribe__Events__Main::instance();
    $date_format = apply_filters( 'tribe_events_pro_page_title_date_format', tribe_get_date_format( true ) );
    // Default Title
    $title = $title_upcoming;
    // If there's a date selected in the tribe bar, show the date range of the currently showing events
    if ( isset( $_REQUEST['tribe-bar-date'] ) && $wp_query->have_posts() ) {
    if ( $wp_query->get( 'paged' ) > 1 ) {
    // if we're on page 1, show the selected tribe-bar-date as the first date in the range
    $first_event_date = tribe_get_start_date( $wp_query->posts[0], false );
    } else {
    //otherwise show the start date of the first event in the results
    $first_event_date = tribe_event_format_date( $_REQUEST['tribe-bar-date'], false );
    }
    $last_event_date = tribe_get_end_date( $wp_query->posts[ count( $wp_query->posts ) - 1 ], false );
    $title = sprintf( $title_range, $first_event_date, $last_event_date );
    } elseif ( tribe_is_past() ) {
    $title = $title_past;
    }
    // Month view title
    if ( tribe_is_month() ) {
    $title = sprintf(
    $title_month,
    date_i18n( tribe_get_option( 'monthAndYearFormat', 'F Y' ), strtotime( tribe_get_month_view_date() ) )
    );
    }
    // Day view title
    if ( tribe_is_day() ) {
    $title = sprintf(
    $title_day,
    date_i18n( tribe_get_date_format( true ), strtotime( $wp_query->get( 'start_date' ) ) )
    );
    }
    // All recurrences of an event
    if ( function_exists('tribe_is_showing_all') && tribe_is_showing_all() ) {
    $title = sprintf( $title_all, get_the_title() );
    }
    // Week view title
    if ( function_exists('tribe_is_week') && tribe_is_week() ) {
    $title = sprintf(
    $title_week,
    date_i18n( $date_format, strtotime( tribe_get_first_week_day( $wp_query->get( 'start_date' ) ) ) )
    );
    }
    if ( is_tax( $tribe_ecp->get_event_taxonomy() ) && $depth ) {
    $cat = get_queried_object();
    $title = '' . $title . '';
    $title .= ' › ' . $cat->name;
    }
    return $title;
    }
    add_filter( 'tribe_get_events_title', 'tribe_alter_event_archive_titles', 11, 2 );

    /**
    * Sets the default date for event queries.
    *
    * Expects to be called during tribe_events_pre_get_posts. Note that this
    * function modifies $_REQUEST - this is needed for consistency because
    * various parts of TEC inspect that array directly to determine the current
    * date.
    *
    * @param WP_Query $query
    */
    function tribe_force_event_date( WP_Query $query ) {
    // Don't touch single posts or queries other than the main query
    if ( ! $query->is_main_query() || is_single() ) {
    return;
    }
    // If a date has already been set by some other means, bail out
    if ( strlen( $query->get( 'eventDate' ) ) || ! empty( $_REQUEST['tribe-bar-date'] ) ) {
    return;
    }
    // Change this to whatever date you prefer
    $default_date = '2018-02-01';
    // Use the preferred default date
    $query->set( 'eventDate', $default_date );
    $query->set( 'start_date', $default_date );
    $_REQUEST['tribe-bar-date'] = $default_date;
    }
    add_action( 'tribe_events_pre_get_posts', 'tribe_force_event_date' );

    The url is: http://progressfestival.org/schedule but it is currently password protected until it goes live on Tuesday morning. I can send login info in a private message if you think you can help.

    Thank you very much.

    #1408605
    Andras
    Keymaster

    Hello,

    Thanks for getting in touch!

    I checked your site in 2 different browsers on my PC in responsive mode and also on my mobile in Chrome and Firefox and the calendar / schedule page properly showed. I also managed to successfully switch between month and list view back and forth. All seemed to work fine.

    Are you still experiencing issues or do you still need help with this.

    If you still have issues, then the starting point would be our conflict testing guide to rule out any plugins and theme interfering with what you want to achieve. If you are still having the issue with only the calendar plugins and a default theme, then we might be facing a bug. If the issue comes out only when other plugins or a different theme is active, then we need to start digging in that direction.

    Let me know what you find.

    Cheers,
    Andras

    #1422424
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Calendar view not appearing on mobile. Page just reloads list view’ is closed to new replies.