Skip Navigation

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using the WP Event Manager and its iCal addon with WPML, you may encounter that the ICS file download functionality breaks. Specifically, the download link redirects incorrectly when WPML is active, preventing the ICS file from being downloaded.


Please, make sure of having a full site backup of your site before proceeding.

  • Add the following code to your theme’s function.php file.
  • Replace:
    // WPML Workaround for compsupp-7348
    function wpml_compsupp7348_filter_wpml_post_parse_query($q) {
        if ( $q->is_feed &&
    		isset($q->query_vars['post_type']) && 
    		$q->query_vars['post_type'] === 'event_listing' &&
    		isset($q->query_vars['feed']) && 
    		$q->query_vars['feed'] === 'single-event-listings-ical' ) {
            	$q->query_vars['p'] = 0;
        return $q;
    add_filter('wpml_post_parse_query', 'wpml_compsupp7348_filter_wpml_post_parse_query');

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>