• Resolved tinynow

    (@tinynow)


    I am using Events Manager and a cpt-onomy called groups. On single group pages, I’d like to display events that are of that group.

    I set it up according to the info on this page using this code:

    function my_em_taxonomy_register(){
    register_taxonomy_for_object_type('groups',EM_POST_TYPE_EVENT);
    }
    add_action('init','my_em_taxonomy_register',100);

    But it doesn’t work.

    I’ve tested it with another custom taxonomy and it works. I really hope you can help.

    Do I need to register the “groups” cpt-onomy as a taxonomy in functions.php? I’ve already registered in in the cpt-onomy GUI?

    https://www.ads-software.com/plugins/cpt-onomies/

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s probably because the action is fired too early. Try using the ‘wp_action’ hook:

    function my_em_taxonomy_register(){
    register_taxonomy_for_object_type('groups',EM_POST_TYPE_EVENT);
    }
    add_action('wp_loaded','my_em_taxonomy_register',100);
    Thread Starter tinynow

    (@tinynow)

    Actually, I thought I just solved it – I didn’t have 'suppress_filters' => false in my query arguments.

    I will try what you suggest if I can understand it and get back to you.

    Thank you for this awesome plugin and all the time you spend supporting it.

    Happy you figured it out!

    Hey,

    I’m having the exact same problem with the exact same plugins – did you ever get a fix for this?

    Rachel – I tried the code you posted and it saves the taxonomy correctly, but when I tried to use the WP Events Manager shortcode as referenced here: https://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/

    Like this:

    <?php echo do_shortcode('[events_list limit="10" party="resonance-records-ibiza-2013" ]#_EVENTNAME[/events_list]'); ?>

    It doesn’t show any events even though they have the taxonomies saved. However, if I try with a different taxonomy it works.

    Any ideas? ??

    Thanks
    Russell

    I’d love to help but it’s a commercial plugin and I don’t have their code. If you could get me the code they use in their shortcode, that would be super helpful.

    Hey Rachel,

    Thank you that would be great ?? The plugin can be downloaded here:

    https://www.ads-software.com/plugins/events-manager/

    I think tinynow was right that it needs ‘suppress_filters’ => false but I’m not sure where it should go?

    Thanks
    Russ

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Integrating cpt-onomy and Events Manager plugin’ is closed to new replies.