January 6, 2013 at 11:47 am #30331
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?January 6, 2013 at 12:10 pm #30332
ok, worked out i can update the function by changing “all” to “upcoming”, which’ll show all the upcoming events.
or … I can just use the /events/upcoming/ and link to that from the nav. I can’t get the month dropdowns to work though, is there a solution to do that?January 6, 2013 at 3:28 pm #30346
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.January 7, 2013 at 9:30 am #30368
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:January 7, 2013 at 9:46 am #30378
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.January 7, 2013 at 9:49 am #30381
I thought it’d be really simple and I was just missing osmething really obvious. I’ll dig about some more. cheersJanuary 7, 2013 at 10:03 am #30384
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?January 8, 2013 at 1:09 am #30412
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.January 8, 2013 at 6:19 am #30416
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?January 15, 2013 at 3:21 am #30832
I couldn’t get that to work at all. I did a work-around where I just added a custom Field to each event which defines the event category, then pull this into the template using the tribe_custom_field() tag, Not the best … but works.January 15, 2013 at 5:47 am #30835
So long as you’re sorted 🙂 and thanks for posting back with the approach you used, might be helpful for others.
- The topic ‘eventDisplay = Don't show past events? + add the date dropdowns?’ is closed to new replies.