Home › Forums › Calendar Products › Events Calendar PRO › Events from a specific category on sidebar
- This topic has 5 replies, 4 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
January 2, 2012 at 6:22 pm #12774
Loren
ParticipantIs there a way to call the mini calendar on the sidebar only from a specific category? I’m building a custom sidebar for one of my pages and I found this function tribe_calendar_mini_grid(), can I feed it any arguments?
January 3, 2012 at 8:00 am #12787Rob
MemberHey Loren, thanks for the note. Have you checked out our tutorial on how to fully customize widgets yet (https://theeventscalendar.com/how-to-completely-customize-widgets/)? Let me know if that wasn’t helpful and I can get our developer Jonah to chime in directly.
January 3, 2012 at 8:19 am #12793Loren
ParticipantHey Rob, I just browsed that and I will say maybe on if it will help me. I’ll pass this on to my partner on my project.
I was looking for maybe something more simple. I will eventually have 12 different pages and each page will need to have only the calendar items from a specific category on the sidebar.
I’ll dive into the code later and see what I can come up with.
I was hoping for something maybe like this
tribe_calendar_mini_grid( $args, $category )
It might be possible but still I haven’t looked at the widget code yet.January 3, 2012 at 5:34 pm #12807Rob
MemberHey Loren. Thanks for confirming. Let me know what you come up with; meanwhile, I will get our developer Jonah to take a look tomorrow and chime in with any thoughts he may have on how to do this more simply. Stay tuned.
January 5, 2012 at 12:46 pm #12922Jonah
ParticipantHey Loren,
To override the calendar widget you simply need to put the table-mini.php file in an ‘events’ folder in your theme. Then in table-mini.php, look at line 12 where the events query is being setup. You can pass any extra parameters you want, such as querying for specific categories. Keep in mind though that The Events Calendar uses taxonomies as categories, rather than actual categories so you would want to use the tax_query parameter to pass in the categories you want to query for. See this codex article for more info: http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters
You can also use any other WP_Query parameters to affect your query. That should get you going in the right direction.
Regards,
JonahJuly 2, 2015 at 5:00 pm #975002Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Events from a specific category on sidebar’ is closed to new replies.
