September 25, 2013 at 12:39 am #165879
The site in question is: http://www.thecentersf.com/test/
I am working in the file: ./includes/helper-template-dynamic.php
I have customized my landing page to display two different versions of upcoming events. On the left is upcoming featured events (queries events tagged as featured), and on the right is today’s classes (queries events tagged as recurring that occur today).
Here is the issue I am having. If I have no upcoming featured events (left side), then Today’s Classes works perfectly. Once I start creating and adding featured events, however, the events in Today’s classes start disappearing.
Here’s an example: I have two recurring events each day currently. If I have no scheduled featured events, then Today’s Classes show both of today’s recurring events, all good. Then I add a featured event, now Today’s classes only shows one event. I add another featured event. Now Today’s classes shows ‘No scheduled events’
I’m guessing the issue has something to do with the query or loop that occurs in function columns_helper_latest_entries?
Here is the code for how I call each column:
$data[‘html_extra’][‘before_content’] = ‘avia_add_event_range';
$data[‘disable_content’] = true;
$data[‘entry_post_type’] = TribeEvents::POSTTYPE;
$today = date(‘j M Y’);
$yesterday = date(‘j M Y’,strtotime (‘today 00:00′));
$data[‘query_post_args’] = array(‘start_date’=>$yesterday,’end_date’=>$today,eventCat=>’recurring’,’eventDisplay’=>’upcoming’);
}September 28, 2013 at 1:43 am #167370
I’ve tagged the topic for the head of support as I’m not as intimately familiar with the plugins output within the theme.
DevinSeptember 28, 2013 at 11:06 am #167518
I think the problem is caused by the offset tracker. This line in the columns_helper_latest_entries() function
$query_post['offset'] = $this->offset_tracker[$data['entry_post_type']];
checks if other columns already display entries from the same post type. If yes, it will remove a certain number of posts (the offset) from the query. In this case it will remove 2 posts from the query of the second column because of the featured events entries in the first column). Try to increase the “post number” value of the second column to 4 and check if the ” Today’s Classes” events work afterwards.
The topic ‘Problems with upcoming event widget queries’ is closed to new replies.