Apparently its possible to add custom post type to Subscribe2, with a little bit of PHP
What I’d need to know is the name of the custom post type that AE1EC uses.
Is it ai1ec_event ?
The PHP I’ve written is
<?php
/*
Plugin Name: AI1EC-Subscribe2
Description: Add AI1EC to Subscribe2 notifications
Version: 0.1
Author: smithgt
*/
function my_post_types($types) {
$types[] = ‘ai1ec_event’;
return $types;
}
add_filter(‘s2_post_types’,’my_post_types’);
?>
But it seems to crash ai1ec with this error
“Fatal error: Uncaught exception ‘Ai1ec_Event_Not_Found’ with message ‘Event with ID ‘5752’ could not be retrieved from the database.’ in /homepages/10/d83518211/htdocs/WordPress/testing/wp-content/plugins/all-in-one-event-calendar/app/model/class-ai1ec-event.php:356 Stack trace: #0 /homepages/10/d83518211/htdocs/WordPress/testing/wp-content/plugins/all-in-one-event-calendar/app/helper/class-ai1ec-events-helper.php(63): Ai1ec_Event->__construct(5752, false) #1 /homepages/10/d83518211/htdocs/WordPress/testing/wp-content/plugins/all-in-one-event-calendar/app/controller/class-ai1ec-events-controller.php(491): Ai1ec_Events_Helper::get_event(5752) #2 [internal function]: Ai1ec_Events_Controller->event_content(‘<p>bbc</p>?’) #3 /homepages/10/d83518211/htdocs/WordPress/testing/wp-includes/plugin.php(170): call_user_func_array(Array, Array) #4 /homepages/10/d83518211/htdocs/WordPress/testing/wp-content/plugins/subscribe2/classes/class-s2-core.php(559): apply_filters(‘the_content’, ‘bbc’) #5 [internal function]: s2class->publish(Ob in /homepages/10/d83518211/htdocs/WordPress/testing/wp-content/plugins/all-in-one-event-calendar/app/model/class-ai1ec-event.php on line 356”
Any ideas what’s gone wrong?
thanks