workaround for all in one event calendar conflict
-
This is a new solution for an old, closed topic. You can read the discussion here:
Rather than wait for the all in one event calendar developer to fix their code, I created a file named custom-post-widget.php in the child theme directory that looks like this:
<?php global $ai1ec_events_controller; if ($in_calendar = (get_post_type() == AI1EC_POST_TYPE)) { remove_filter('the_content', array($ai1ec_events_controller, 'event_content'), PHP_INT_MAX - 1); } if ( !$apply_content_filters ) { // Don't apply the content filter if checkbox selected $content = apply_filters( 'the_content', $content); } if ($in_calendar) { add_filter('the_content', array($ai1ec_events_controller, 'event_content'), PHP_INT_MAX - 1); } echo $before_widget; if ( $show_custom_post_title ) { echo $before_title . apply_filters( 'widget_title',$content_post->post_title) . $after_title; // This is the line that displays the title (only if show title is set) } if ( $show_featured_image ) { echo get_the_post_thumbnail( $content_post -> ID ); } echo do_shortcode( $content ); // This is where the actual content of the custom post is being displayed echo $after_widget;
This worked like a charm. ?? A similar solution may work with other plugin conflicts.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘workaround for all in one event calendar conflict’ is closed to new replies.