Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there!

    Sorry to hear you’re having trouble with your list view pages. Would you mind taking a moment to run through our conflict testing steps to begin our troubleshooting process? This will help us to narrow down any third-party themes or plugins that could be causing problems.

    Thanks!

    Thread Starter samster91

    (@samster91)

    Hi Caroline,
    I’ll try with the conflict testing steps right now and I’ll let you know!

    Thanks!

    Thread Starter samster91

    (@samster91)

    Hello Caroline,
    the problem is actually in the Theme: I’ve installed Tavern by AxiomThemes bought through themeforest. I’ve discovered this when after switching to Twenty Sixteen everything worked fine.
    The problem is in the function ‘axiom_wp_theme_setup’ declared in the file fw/core/core.wp.php where the action ‘pre_get_posts’ call the function ‘axiom_query_posts_where’ that does something bad to the post list.
    But it’s not enaugh, infact, removing that line part of the problem still remain: specifically, in my case, the first post is not shown in the page.

    Can you provide me help in any way?

    Thanks.

    Hi again,

    Thanks so much for taking the time to explore a bit more–glad you were able to identify a culprit! We’re one step closer. ??

    Without being able to test your specific theme (as it’s a premium theme), it’s difficult to speculate on what part of the theme code might be causing problems. Does your theme offer options for specifying post order for individual post types? If so, you may wish to check here first; it’s possible that your events are being sorted by post date (like blog posts) rather than event date, and this may be a setting you can change for your event listings.

    Let us know what you’re able to find–and please do give us a heads up if you should discover anything else that might be helpful to us in troubleshooting!

    Thread Starter samster91

    (@samster91)

    Hi Caroline,
    I’ve finally find out the problem after many hours of digging into the code.. so, the responsible function is axiom_query_add_posts_per_page declared into fw/core/core.wp.php specifically when it calls the function axiom_get_template_page_id(‘archive’): this function seems to mess up everyting about the events loaded.

    I’ve found a work around by adding a condition as follow:
    if ($query->is_archive()) {
    if ($query->get(‘post_type’)==’tribe_events’){
    require ABSPATH.’wp-content/plugins/the-events-calendar/src/Tribe/Query.php’;
    $args = array (
    ‘eventDisplay’ => $query->tribe_is_past?’past’:$query->get(‘eventDisplay’),
    ‘post_type’ => ‘tribe_events’,
    ‘post_status’ => array (‘publish’,’private’),
    ‘paged’ => $query->query_vars[‘paged’],
    ‘tribe_events_cat’ => $query->get(‘tribe_events_cat’)
    );
    Tribe__Events__Query::init();
    $query = Tribe__Events__Query::getEvents( $args, true );
    global $wp_query, $post, $paged;
    $wp_query = $query;
    if ( ! empty( $query->posts ) ) {
    $post = $query->posts[0];
    }
    } else{
    $page_id = axiom_get_template_page_id(‘archive’);
    }
    }

    replacing the old statement:

    if ($query->is_archive()) {
    $page_id = axiom_get_template_page_id(‘archive’);
    }

    first and last time ??

    Thanks for the support provided.

    Thanks for following up with your findings here–so glad to hear you’ve gotten things working now! ?? Please don’t hesitate to follow up with a new thread if you should have any other questions or concerns!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Events order in List View’ is closed to new replies.