• Resolved johnnydev

    (@johnnydev)


    Hi

    I’m using two plugins: Subscribe2 and Events Manager. I use code below to use custom post type created by events manager, but subscribe2 still sends me email with posts created by wordpress itself (i.e. “Hello World!”) instead of posts (events) created by events manager plugin.

    The code I’m traing to use in my theme function.php file is:
    function my_post_types($types) {
    $types[] = ‘event’;
    return $types;
    }
    add_filter(‘s2_post_types’, ‘my_post_types’);

    Instead of “event” I also try to use php constant “EM_POST_TYPE_EVENT” but it also doesn’t work.

    What I’m missing here, maybe some option in settings of subscribe2? I have checked “send emails for pages” to yes and in settings panel of Subscribe2 I can see my events created by events manager but still it doesn’t send me proper post when I click “send email preview” or when I create time schedule.

    Thx for the help!

    https://www.ads-software.com/extend/plugins/subscribe2/

Viewing 5 replies - 1 through 5 (of 5 total)
  • @johnnydev,

    I suspect you would also need to register the Event Manager taxonomy ‘event-categories’ as the core WordPress categories don’t seem to be used.

    Thread Starter johnnydev

    (@johnnydev)

    Hi,

    thx for the replay! Is this code below enough? Or do I have to add something more? And I must add it in function.php file?

    register_taxonomy( ‘event-categories’, ‘category’, $args );

    Best Regards!

    @johnnydev,

    There is a filter for this in the same way as there is a filter for custom post types. Have a look in the FAQ section where it says “How can I make use of the support for Custom Taxonomies”

    Thread Starter johnnydev

    (@johnnydev)

    Hi,

    thx a lot for the help, but I can’t still get what I want ?? I have registered custom taxonome and custom post type. I really don’t know what to do next or what I’m missing here.

    I will try with other plugins.

    Best regards!

    @johnnydev,

    If you’ve done this correctly when you go to Subscribe2->Settings and then the Registered Users tab you should see the custom taxonomy structure for the event plugin in the compulsory and excluded category sections and you should also see the see the post format listed under the excluded formats heading.

    Make sure the format and excluded categories boxes are not checked.

    Also, bear in mind that some event plugins like this only create the table data after calling the hooks in WordPress so Subscribe2 has nothing to work with when it’s called so it exits gracefully rather than sending blank emails.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom post type’ is closed to new replies.