Home › Forums › Calendar Products › Events Calendar PRO › Include Calendar/Upcoming Events by Category into my Page Template
- This topic has 5 replies, 3 voices, and was last updated 13 years, 1 month ago by
Jonah.
-
AuthorPosts
-
March 14, 2013 at 1:01 pm #42711
Denise Crosbie
ParticipantI basically want to replicate the exact functionality on this page:
http://www.manitobathunder.net/events/category/manitoba-thunder-events/upcoming/I want to hard-code into my template:
1 – The calendar / upcoming event list toggle buttons so users can swap to both as in the page above
2 – I want to hard-code to be specific to only one category – so each team can view it’s own team events.Is there a way to do this? I have found the tribe_calendar_grid() function but it does not have the toggle buttons or the option to filter by category.
Thanks so much!
Denise.March 18, 2013 at 7:51 am #43059Jonah
ParticipantHi Denise,
At this time we don’t really provide the ability to use a function or shortcode to display the calendar or list outside of the default setup. In fact, we don’t even have public functions or a shortcode to be used in this way. We do provide a query function (https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events) and this will allow you to query events anywhere in your site, but you will need to format the results yourself. You can also use WP_Query and here is an example: https://gist.github.com/jo-snips/5112025
Calendar categories can all be access via a specific URL (i.e. http://yourdomain.com/events/category/festivals/) so maybe you just need to link to a specific category in your website navigation to provide access to that category. The toggle buttons to switch between list and calendar work as expected in a category, keeping you viewing only that category.
I hope this all helps. Let me know if you have any other questions.
Regards,
JonahMarch 18, 2013 at 4:13 pm #43198Denise Crosbie
ParticipantYes I have decided just to link to the category links provided by default. I just embed the advanced list widget into the template, then they can get to the calendar view by category from the link on there. Not as lovely as I would have liked, but good enough for my clients I think.
March 18, 2013 at 4:24 pm #43201Jonah
ParticipantSounds good Denise. Let me know if there’s anything else I can do for you.
Regards,
JonahMarch 21, 2013 at 1:56 pm #43719Scott Stephanoff
Participanti have a similar request and have used the widget solution as an alternative but would like a more elegant solution if possible.
i am trying to display a list of events (or maybe the calendar/grid) view on my homepage. i have tried some of the code provided in the link https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events but get: Fatal error: Call to undefined function tribe_get_events()
i am sure i am just being slow and overlooking something – but any help would be appreciated.
March 21, 2013 at 3:26 pm #43726Jonah
ParticipantHi Scott,
That’s odd that you would be getting that error. I’d need to see your code and know where you are putting it to be able to troubleshoot… Can you post it to http://snippi.com/?
– Jonah
-
AuthorPosts
- The topic ‘Include Calendar/Upcoming Events by Category into my Page Template’ is closed to new replies.
