Tagged: 

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #793659

    Hi,

    On our site we are using the Masonry Element to display events from “The Events Calendar”. We love the functionality of being able to pull the events from the calendar into the homepage in the masonry format. However, we are having issues with old events displaying even after they have passed (the event has ended). Is it possible for the Masonry element to only display the soonest upcoming events and not the ones that have passed?

    Also, we want to make sure that the order is in sequence of the event date, not the date the event was published. Show we be using the Order by “Date” (ascending) or should we be using Order By “Page Order” (descending)? We just want the masonry tiles to have the current events in order that they are coming up.

    Your help is appreciated!

    #793871

    Hey wowzers3888,

    Could not reach you site today. Have you moved it? Or you have some IP blocking functionality installed?

    Best regards,
    Victoria

    #794135

    Hi Victoria,

    Sorry, the correct URL is below. The masonry element is on the homepage after you scroll down a bit.

    Thanks!

    #794675

    Hi,

    Thank you for the info.

    Please add this filter in the functions.php file:

    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(24)) {
    	        $query['post__in'] = $include;
    	}
    	return $query;
    }

    Best regards,
    Ismael

    #795040

    Thank you! I really appreciate the fast response! This did do the trick. My only other question would be: When we have recurring events, can we keep the recurring event showing in the masonry layout until the last date of that recurring event? Is that the way it already works with your code, or is there something else we need to do?

    Thanks!

    #795745

    Hi!

    The recurring events should still display after the first event. Use conditional functions if you want to apply this filter on a specific page or post.

    Regards,
    Ismael

    #796082

    Great, thank you so much!

    Kevin

    #796174

    Hi Ismael,

    Sorry, I noticed that all my masonry elements on other pages have disappeared. Can you please send me the code that would make your fix conditional to just the homepage? I am not able to find a good way to do this in the functions.php file. Thanks!

    #796586

    Hi,

    We added the is_page conditional function inside the filter.

    Best regards,
    Ismael

    #796664

    Awesome, thank you!

    #796918

    Hi,

    Glad we could help. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #901681

    I have the same request! On my home page, I use several masonry, including one to list upcoming events!

    1- I would like to post only upcoming events by date of the event!
    2- In addition, I would like to display with the title the date of the event and the time of it!

    I do not want the code to affect the other masonry of the page!

    web site : http://delerabliere.ca/

    Can you help me ?

    #901852

    Hi,

    1.) Please use the filter above. Adjust the value of the is_page function with the id of the page where the masonry element is located.

    2.) Please edit the av-helper-masonry.php file. It is located inside the config-templatebuilder > avia-shortcode folder.

    Best regards,
    Ismael

    #901879

    Hi Ismael!

    # 1) When I put the code in the functions.php file …. the filter works partially … many events are not displayed … the filters and the load more button disappear !!!

    # 2) I locate the file av-helper-masonry.php … how do I add the code to display the date and time of the event?

    Thanks for your help !

    #902176

    I forgot to restrain the fact, when I put the code, all the masonry disappear from the page! Can we do this only for a specific mansonry ID?

    On my homepage, I have a masonry portfolio, a masonry post and a masonry events !!!

    #903294

    Hi,

    Please create a new ticket or post with the site url and the login credentials. We’ll check it there.

    Best regards,
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Problems with Masonry Element with The Events Calendar’ is closed to new replies.