ICS Calendar includes a number of hooks that were created primarily to allow ICS Calendar Pro to extend its functionality. Many of these hooks are still in development and subject to change, but we will document them here as they become available for theme and add-on developers’ use.
Where do I put this code? We do not recommend making these types of changes unless you have at least a basic understanding of working with PHP. If you are comfortable directly editing files, these changes should generally be made in your theme’s
functions.phpfile.Important: If you are using a third-party theme, you should not edit the files directly, as any automated updates will overwrite your changes. Create a child theme or custom plugin instead. We have created an empty custom plugin you can download and use as a starting point.
Not a developer? ICS Calendar Pro’s Calendar Builder includes tools to allow easy access to some of these filters without writing any code.
Developing in a local environment (e.g. Docker, MAMP, XAMPP, etc.)? If you’re using ICS Events, or are otherwise accessing calendar feeds that are also being fed from your local environment (e.g. an ICS file uploaded to your Media Library, or a feed generated by another calendar plugin), you may find ICS Calendar fails to retrieve the feeds.
This is because development environments that run inside a container may be using port forwarding. You may be requesting pages via a URL like
http://localhost:8888(i.e. port 8888), but inside the container, Apache may still be listening on the default port 80.Since ICS Calendar itself is making HTTP requests to the website to retrieve the feeds, Apache within the container must also be listening on the custom port you’re using outside the container. Locate the file
/etc/apache2/ports.conf(or similar) within the container, and after the lineListen 80add the lineListen 8888(or your own custom port number). Then restart the container.For ICS Events, you may also need to make sure that your site is using “pretty permalinks” to ensure that WordPress REST API URLs are working properly. Navigate in your WP admin to Settings → Permalinks and change the Permalink structure setting to anything other than “Plain.”