Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!

    #942006

    Hey 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,
    Mike

    #942007

    Oh yes, i just erased it as i was trying some things, i tried adding it back in but no luck!

    #942036

    Hi,
    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,
    Mike

    #942043

    Hi 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!

    #942046

    Hi,
    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,
    Mike

    #942167

    Hi 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

    #942209

    Hi,
    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘The events calendar and Masonry sorting’ is closed to new replies.