Events from a specific category on sidebar

Home Forums Calendar Products Events Calendar PRO Events from a specific category on sidebar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12774
    Loren
    Participant

    Is 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?

    #12787
    Rob
    Member

    Hey 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.

    #12793
    Loren
    Participant

    Hey 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.

    #12807
    Rob
    Member

    Hey 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.

    #12922
    Jonah
    Participant

    Hey 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,
    Jonah

    #975002
    Support Droid
    Keymaster

    This 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Events from a specific category on sidebar’ is closed to new replies.