Forum Replies Created
-
AuthorPosts
-
josephmak
ParticipantNico, you are the man!
That worked perfectly. I guess I didn’t explore the API as well as I thought I had. Thanks so much for your solution 🙂
Amanda
josephmak
ParticipantHi Josh,
Perfect! This worked exactly as you said it would I ended up using the event wrapper .tribe-events-photo-event-wrapper instead of the details div you suggested. All I had to be mindful of was how high the highest description was. I ended up using a height of 500px and adjusting some of the excerpts so that they would fit into this defined height. If the combination of the title, price and excerpt was higher than the explicitly set height, it would break the styling for all events after the offending event. Just a bit of a finicky process, but I got it all working.
This solutions seems to have fixed the other issue of events not showing up in the right order as well! Now the only thing I need to figure out is why some events guid (permalink) is set to the site url as opposed to the event link.
Thanks again for all your help, you guys are great!
josephmak
ParticipantHi Nico,
I don’t believe I made a custom query for the listing page. I did a custom query for the home page where I am displaying the three random events. Both the event listing page and the individual featured events have incorrect urls and I can’t determine what is making some of them have correct urls and others just have the home url.
For the three random events that are displayed on the home page and on individual event pages, the code is as follows:
$args = array('start_date' => date('D, d M Y H:i:s')); $events = tribe_get_events($args); shuffle($events); //randomize the events so they show up differently each timeThen I created a function to display only the necessary information for the featured events:
/* custom event functions */ function output_asba_event($event){ $title = $event->post_title; //get the dates from start and end date preg_match_all("/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$event->EventStartDate, $start_date); preg_match_all("/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/",$event->EventEndDate, $end_date); $start_month = $start_date[2][0]; $start_day = ltrim($start_date[3][0], 0); $v = tribe_get_recurrence_start_dates($post_id); var_dump($event->guid); echo '<a href="'.$event->guid.'">' . tribe_event_featured_image($event->ID, 'thumbnail', false) . '</a>'; echo '<a href="'.$event->guid.'"><h4 class="asba-teal-title">' . $title . '</h4></a>'; switch ($start_month){ case '01': $start_month = 'January'; break; case '02': $start_month = 'February'; break; case '03': $start_month = 'March'; break; case '04': $start_month = 'April'; break; case '05': $start_month = 'May'; break; case '06': $start_month = 'June'; break; case '07': $start_month = 'July'; break; case '08': $start_month = 'August'; break; case '09': $start_month = 'September'; break; case '10': $start_month = 'October'; break; case '11': $start_month = 'November'; break; case '12': $start_month = 'December'; break; } echo '<h5 class="asba-home-event-date">'.$start_month.' '. $start_day . ' '; if(tribe_event_is_all_day($event->ID)){ echo "- All Day</h5>"; } else{ echo tribe_get_start_date($event, false, $format = 'g:i A') . '-' . tribe_get_end_date($event, false, $format = 'g:i A'); echo '</h5>'; } }I can’t seem to find the place where the default Events Calendar query is happening, I didn’t look all that hard 😛 I can send you a var_dump of the query from one of the templates if that would help?
josephmak
ParticipantAny progress on this?
I am also trying to get the events to line up horizontally on the listing page as opposed to fit in nice and tiled the way it is now. I have tried a few different things (putting three events into a row etc…) with no luck. I think my lack of success on this endeavour is related to the javascript you mentioned above. Is there a good way to achieve the events showing in a nice aligned row with the height of the highest event?
Thanks so much!
josephmak
ParticipantThe live site might be a better place to test this as there are way more events on there. The url is albertabrewers.ca
josephmak
ParticipantLooking further into the issue, I am unsure if it is just recurring events or if the problem is completely random. The “Central Alberta Beer Week Party” is not actually a recurring event, I just assumed it was because of the name. So I guess a more appropriate thread title would be “Random events guid wrong” ?
josephmak
ParticipantThis reply is private.
josephmak
ParticipantHi Brian,
Thank you for your reply. I went ahead and fixed the error caused by the Google map API script being included more than once on the page. This did not seem to fix the strange functionality we are experiencing with the filter bar. Can you provide another suggestion?
Amanda
josephmak
ParticipantThis reply is private.
josephmak
ParticipantAwesome! Brian, thank you so much! This fixed the issue 🙂
-
AuthorPosts
