Viewing 15 replies - 1 through 15 (of 18 total)
  • @neilfoster,

    Are you registered the custom post type and the custom taxonomy in some code for Subscribe2 to recognise the ‘posts’ created by “The Events Calendar”?

    Thread Starter neilfoster

    (@neilfoster)

    I have tried several code snippets in my functions.php that are recommended in the Subscribe2 forums but have had no luck.

    I’m likely using the incorrect terminology.

    The “event posts” are “tribe_events” and the “event categories” are “tribe_events_cat”, correct?

    And I have to make Subscribe2 read both of those, correct?

    FYI, I’m not a programmer by any means but I can read most php code and understand what it’s doing after I see it.

    Thanks for any guidance!

    @neilfoster,

    The post and taxonomy names look about right to me based on a quick check of The Events Calendar code but since that’s not my plugin I cannot say with 100% certainty.

    Perhaps you should post the code you are using here so we can check it for errors.

    Thread Starter neilfoster

    (@neilfoster)

    Here’s one of the many I tried. From this page:
    https://subscribe2.wordpress.com/2011/06/06/subscribe2-and-custom-taxonomy-types/

    The following code was entered into functions.php but errors stating an invalid callback (First argument is expected to be a valid callback):

    function my_taxonomy_types($taxonomies) {
    // where ‘my_taxonomy_type’ is the name of your custom taxonomy
    $taxonomies[] = ‘tribe_events_cat’;
    return $taxonomies;
    }
    add_filter(‘s2_taxonomies’, ‘tribe_events_cat’);

    Thread Starter neilfoster

    (@neilfoster)

    Also tried this at one point. No errors, but nothing more in the list either. From: https://subscribe2.wordpress.com/2011/02/28/subscribe2-and-custom-post-types/

    function my_post_types($types) {
    $types[] = ‘tribe_events’;
    return $types;
    }

    add_filter(‘s2_post_types’, ‘tribe_events’);

    @neilfoster,

    The problem is down to the ‘add_filter()’ lines. The first part inside the brackets is the name of the filter in Subscribe2 and the second part is the name of your function. In both cases you have changed the function name in the ‘add_filter()’ call but not changed the function name further up. They need to be the same. As an example, here is the correct taxonomy code:


    function my_taxonomy_types($taxonomies) {
    // where 'my_taxonomy_type' is the name of your custom taxonomy
    $taxonomies[] = 'tribe_events_cat';
    return $taxonomies;
    }
    add_filter('s2_taxonomies', 'my_taxonomy_types');

    Thread Starter neilfoster

    (@neilfoster)

    OH MY GOODNESS!!!!
    THANK YOU!!! THANK YOU!!! THANK YOU!!! THANK YOU!!!

    Perfect!

    Now it makes SO much sense! The filter has to match the function I created…

    My brain was just burned out. I looked at so much code in the last few days that I missed something SO simple as that. What a relief!

    This is gonna work out so well now.

    Thanks again!

    @neilfoster,

    ?? You are welcome! It’s easy to get caught out by the simple things when you are looking for a difficult solution.

    Thread Starter neilfoster

    (@neilfoster)

    Well, after all of that, I got the event categories to show up, but now it is not emailing when that event category is selected.

    It emails when a standard WP category is selected, but not the event category.

    I guess I have some digging and experimentation to do…

    Thread Starter neilfoster

    (@neilfoster)

    Well, it looks like you’ve already solved this issue with 8.2, but I’m still not getting it. Next step is to deactivate all my other plugins once again and give it a try… tomorrow…

    https://www.ads-software.com/support/topic/plugin-subscribe2-notifications-for-custom-taxonomies-not-impelmented?replies=5

    @neilfoster,

    Some events type plugins use custom code to insert the database information and this code doesn’t call the core WordPress hooks. Unfortunately that means that Subscribe2 doesn’t work.

    That said, Subscribe2 and The Events Calendar have worked together in previous versions.

    Thread Starter neilfoster

    (@neilfoster)

    Tried deactivating all plugins and that did not help.

    Oddly enough, when I do a test email from Subscribe2 to the recipients (choosing one of the “event categories”) it does send the email…

    perplexed but not defeated…

    @neilfoster,

    I’m trying to recall, I know I have tested it with AIO Even Calendar. I think I tried with this plugin too but can’t recall if I got it working.

    Thread Starter neilfoster

    (@neilfoster)

    @mattyrob

    hmmm.. I get the same results with AIO right now.

    I can send a test email, but when the event category is selected, and an event post is made in that event category, I get nothing.

    I’ll dig into that one more tonight or tomorrow. I hate to start all over with all the modifications I did in the event calendar, but I will if AIO works…

    Thread Starter neilfoster

    (@neilfoster)

    didn’t register my custom posts types… ??

    Got it.

    function my_post_types($types) {
    $types[] = ‘tribe_events’;
    return $types;
    }
    add_filter(‘s2_post_types’, ‘my_post_types’);

    But I see a flaw, or an overlook, or just another WordPress peculiarity. It only emails when the event is created (to those subscribed to the event category attached to that event.. as it should). BUT only when it is CREATED. If I go back and edit the event and attach another category, it doesn’t send an email to the subscribers of the newly attached event category … Which sucks and pretty much renders the whole idea of subscribing to the event categories useless.

    Unless there is something elsewhere that I am missing.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Custom taxonomies in Subscribed Categories list’ is closed to new replies.