Lawrence Hirsch

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Lawrence Hirsch
    Participant

    I am having the same problem since updating to 10.12.4. The calendar widget works fine, but not the list one.

    Lawrence Hirsch
    Participant

    The active theme name is Santorini Resort v1.3 (CSS igniter). I also tested the function in TwentyThirteen and same result for me.

    Lawrence Hirsch
    Participant

    Sure, here;’s the code:

    /**
    * Forcing Categories to display in List View in The Events Calendar
    */
    add_action(‘parse_query’, ‘use_list_view_for_categories’, 60);

    function use_list_view_for_categories($query) {
    // Run once
    remove_action(‘parse_query’, ‘use_list_view_for_categories’, 60);

    // Interfere only for non-ajax Tribe category requests not already destined to be presented by list view
    if (defined(‘DOING_AJAX’) && DOING_AJAX) return;
    if (!isset($query->tribe_is_event_category) || !$query->tribe_is_event_category) return;
    if (tribe_is_view(‘upcoming’)) return;

    // Obtain the query term and get a link to list view for that term
    $main_tax_query = $query->tax_query->queries[0];
    $term = get_term_by(‘slug’, $main_tax_query[‘terms’][0], TribeEvents::TAXONOMY);
    $link = tribe_get_listview_link($term->term_id);

    // Try to redirect
    wp_redirect($link);
    exit();
    }

    Default is set to month view.
    tried in current theme’s functions (as well as child theme)
    ../events/ shows the Month View.
    category page …/events/category/upcoming/ ; this is still showing as month

    Lawrence Hirsch
    Participant

    I have tried disabling all other plugins, but still can’t get this to work. I tried the function addition to my child functions and alternatively to the theme, but neither work.

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