I have created a category “Exclude from Main” to hide certain events from our main calendar (https://calendar.southeastern.edu/).
I would still like to see those events in the calendar view for that group (Calendar - Southeastern Louisiana University). Is this possible?
Hi Sarah,
Sure thing – I think the “Show only certain event types” example on this page Setting up LiveWhale Calendar - LiveWhale Support is close to what you want here. But instead of only showing certain category= on the homepage, you can apply your exclude_category= to the homepage and allow them to show on all group pages.
Example: Include specific event types in /_ingredients/themes/global/includes/calendar_settings.html
<widget type="events_calendar">
<arg id="mini_cal_heat_map">true</arg>
<arg id="thumb_width">200</arg>
<arg id="thumb_height">200</arg>
<arg id="hide_repeats">true</arg>
<arg id="show_groups">true</arg>
<arg id="show_tags">true</arg>
<arg id="search_all_events_only">true</arg>
<arg id="search_all_groups">false</arg>
<xphp content="true">
<if var="server_dirname" equals="/" />
<content>
<!-- LW: if on the homepage, only show certain event types -->
<arg id="category">Open to the Public</arg>
<arg id="category">Special Events</arg>
</content>
</xphp>
</widget>
Or, some other variant of that XPHP logic that applies just to 1 or more group calendars (more examples are on that page) will probably do the trick. Hope this helps!
Thanks for the quick reply. I tried adding
> <xphp content="true">
> <if var="server_dirname" equals="/" />
> <content>
> <!– LW: if on the homepage, exclude certain event types –>
> <arg id="exclude_category">Exclude from Main</arg>
> </content>
> </xphp>
but whenever I add that code the entire calendar disappears. Is there an error in the code?
Ah, sometimes when copy-pasting an HTML comment it becomes an em or en dash whereas you really want <!-- and --> – you could try removing the HTML comment altogether and see if that helps.
Also, as always, we recommend testing theme changes on your dev site before copying to production! ![]()
AH that was it! Thank you for your help!