-
AuthorPosts
-
March 26, 2021 at 12:42 pm #1290544
Hi Team,
I have been struggling to arrange my events on a Blog post Gird Layout. Basically, using the events calendar pro, I am posting events and using the Blog Post grid layout to display them. The issue is, the blog post displays the event as when it was posted on WordPress instead, of arranging as per the EVENT date. The main problem happens as we post multiple events on the same day and it is not arranging as per the Event date instead of the blog post date.
I looking into a couple of forums maybe something like this : (which works for magazine)
https://kriesi.at/support/topic/events-date-in-magazine-element-not-creation-date/or like this: https://kriesi.at/support/topic/enfold-masonry-sort-by-date-in-the-events-calendar/
If we could get this working it would be great.
Thanks,
NamgyalMarch 29, 2021 at 12:39 am #1290989Any assistance guys? Thanks.
April 1, 2021 at 3:52 am #1291645Hi,
Sorry for the delay. You can use the filter that we provided in the following thread to adjust the order of the posts or events based on their start date.
// https://kriesi.at/support/topic/enfold-masonry-sort-by-date-in-the-events-calendar/#post-1280546
Just replace the avia_masonry_entries_query with avia_blog_post_query , and remove the conditional tag is_page.
Best regards,
IsmaelApril 1, 2021 at 2:30 pm #1291784Thanks, Ismael for your reply. However, I did try the following code and it didn’t work. Any help?
/* The events calendar and blog post */
function avia_blog_entries_query_mod( $query, $params ) {
$include = array();
$events = tribe_get_events( [
‘posts_per_page’ => $query[“posts_per_page”],
‘start_date’ => ‘now’,
] );
foreach($events as $event) {
$include[] = $event->ID;
}
return $query;
}
add_filter(‘avia_blog_post_query’, ‘avia_blog_entries_query_mod’, 10, 2);April 5, 2021 at 2:27 am #1292387Hi,
We included this line in the filter.
unset($query['tax_query']);And please note that this might not work as expected if there are recurring events.
Best regards,
IsmaelSeptember 3, 2021 at 12:03 pm #1319629Hi Guys,
Thank you all for your support!
Cheers,
N -
AuthorPosts
- The topic ‘Events Calendar and Blog Grid Layout’ is closed to new replies.
