eventDisplay = Don't show past events? + add the date dropdowns?
After a bit of faffing about I’ve worked out that I need to pretty much bypass the standard event page (as Im using the calendar in the header), so I’ve created a new Events page using the script on this page :
Under the First Get Event Example.
This shows all events though, I need it to just show future events, also is there a tag or bit of script that I can put in to include the date dropdowns?
another quick one.
Im using the aforementioned script, is there a way to pass in the cateogry name in some way, I can get it using php tribe_meta_event_cats();
but that brings in a link as well, I need to just get the name so that I can assign it as a class and style using a colour. Is that possible.
I’ll hopefully get this online soon so you can have a better idea of what Im talking about, deadline is 8 hours away, so a bit flushed at the moment.
I can’t get the month dropdowns to work though, is there a solution to do that?
Not sure I completely understand, but by default the upcoming events list does not include month dropdowns. It shows all upcoming events, in paginated form, from today until the end of time. Or at least until the date of the last event in the database.
is there a way to pass in the cateogry name in some way, I can get it using php tribe_meta_event_cats()
Yes, it works just like a regular WP query. So if you want to include a category you will probably need to include a taxonomy query.
I need to just get the name so that I can assign it as a class and style using a colour. Is that possible.
This plugin by Andy Fragen may not do quite what you want, but you could certainly look at how it’s been put together and it might give you a few ideas:
Here’s my site (Work in Progress)
On my Homepage Upcoming Events List, I have the wee coloured boxes which represent a category, this is pretty straight forward because the class on the LI’s are named for the container, ie li class=”cat_sportive”.
I thought this would be easy to ull through to this page : http://bikeeventsdev.madebrave.com/events-listing-page/, which lists all the events.
Oh I see – so all you need is the category to be reflected in a CSS class for the list item containing the event?
The thing is, if I look at a default upcoming events list the events are contained in divs, rather than list items, and there is indeed a CSS class for each container reflecting the category (if one has been assigned, of course).
Perhaps you have customized the list view and have dropped the code that puts this in place?
Yup, just need the css class, it doesn’t really matter if it’s div’s or LI’s as I can just change, just need to get an individual class for each category (works on the homepage using the Advanced Widget), but, Im not actually using the list view on these pages, as I am already using the calendar from the “View Events” (slide down overlay) link in the header, and I can’t have 2 calls to the events calendar in the same page.
So, im using the tribe_get_events() function to pull out the events on this page.
OK, got you now. Well, if you are unable to use the regular upcoming events list which already has this property (of representing the category as a CSS class) and customize from there you’ll need to ape what that default template does.
Does that help here?