Yes, although it does require a bit of PHP code:
https://icscalendar.com/developer/#r34ics_display_calendar_exclude_event
You can replace summary with location and you’ll need to change !== to === to exclude events that do not include the string you’re matching.
Thanks for quick response.
There have been some wishes that we have buttons with the different locations that shall be filtered.
<html>
<head>
<script>
function fillTextbox() {
document.getElementById('ics-calendar-filter-text').value = 'Skällinge IP';
}
</script>
</head>
<body>
<button onclick="fillTextbox()">Skällinge IP</button>
</body>
</html>
I´m trying to fill the textbox but it´s not working.
You have any idea?
@grolken I’m sorry, but the filter is a feature of the Pro version of the plugin, so I’m not allowed to provide support for it in these forums. Please use the Pro Support Request form. Thanks.
Hi.
Tried to add this code, but nothong happends.
Put it in my themes functions.php also tried a code snippet plugin.
add_filter('r34ics_display_calendar_exclude_event', function($exclude, $event, $args) {
if (stripos($event->location, 'Skällinge IP') === false) {
$exclude = true;
}
return $exclude;
}, 10, 3);
Edited:
Noticed that it worked in month and listview, but not in basic view.
-
This reply was modified 2 years, 5 months ago by
grolken.
This filter applies to all views. My best guess is that your site already had the basic view cached. Try the Clear Cached Calendar Data tool on the ICS Calendar admin page and then view the basic calendar again.