-
AuthorPosts
-
April 14, 2018 at 4:43 pm #941975
Hi! I am using the events calendar, and displaying the events in a masonry grid, in two different pages.
I want the masonry to be displayed by the event date, mixing categories (which in my case are the venues), and hide past events. It was working fine until now, i was using this code i´ve seen in other post:
add_filter(‘avia_masonry_entries_query’, ‘avia_masonry_entries_query_mod’, 10, 2);
function avia_masonry_entries_query_mod( $query, $params ) {
$eventquery = array(‘paged’=> false, ‘eventDisplay’ => ‘list’);
$upcoming = Tribe__Events__Query::getEvents( $eventquery, true);
$include = array();foreach($upcoming->posts as $key => $event) {
$include[] = $event->ID;
}
if(is_page([470,962])) {
$query[‘post__in’] = $include;
}
return $query;
}Now all of a sudden it stopped working, and i cant even change the order of the masonry. It´s always the same no matter what i do or choose. It´s descending order (post date, not event date), and it separates categories.
I am going mad here, any help will be soooo appreciated!
April 14, 2018 at 6:29 pm #942006Hey jjsabatino,
I logged in but I don’t see the above code in your functions.php, have you tried adding it back in?Best regards,
MikeApril 14, 2018 at 6:30 pm #942007Oh yes, i just erased it as i was trying some things, i tried adding it back in but no luck!
April 14, 2018 at 8:38 pm #942036Hi,
Well, just a thought. Ok so can you explain what changed when your function stopped working, had you updated Enfold or the Events calendar? Perhaps one of the terms has changed, I wonder if downgrading one or the other would get it working again so we can isolate the which term changed
Have you tried disabling your plugins?Best regards,
MikeApril 14, 2018 at 9:06 pm #942043Hi Mike! thanks for checking. Nothing changed! not that i know of, it was suddenly. I deactivated plugins and nothing….it´s such a big problem because i have to deliver the website very soon and everything was under control. No idea what happened!
April 14, 2018 at 9:25 pm #942046Hi,
OK, I found that on the homepage, the masonry element was set to only show 4 items, I changed it to all. Please check that the function is now working.Best regards,
MikeApril 15, 2018 at 11:18 am #942167Hi MIke, thank you but that was not the issue. I wanted just 4 in the homepage. Anyway, i found the solution. It was the Post Types Order plugin, it was overriding the php function. Thank you anyway, and great support as always! you can close this now
April 15, 2018 at 3:12 pm #942209Hi,
Thank you for sharing your solution, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
and the video tutorials here
And if there are features that you wish Enfold had, you can request them and vote the requested ones here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘The events calendar and Masonry sorting’ is closed to new replies.