• Resolved cfabrice

    (@cfabrice)


    Hello I’m trying to attach “regular” post category to events but I don’t manage to do it.
    I tried to add the following code either in events-manager/em-posts.php and/ or in my functions.php file but without succes

    register_taxonomy_for_object_type(‘category’, EM_POST_TYPE_EVENT);

    Any idea ?
    Thank you !

    http://wordpress.org/extend/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • agelonwl

    (@angelonwl)

    Thread Starter cfabrice

    (@cfabrice)

    Thanks !
    I guess we will be able now to retrieve associated custom posts sharing the same taxonomy !
    Great plugin !

    Thread Starter cfabrice

    (@cfabrice)

    hello, just a pbl !
    I can assign the “post-category” to events, like I used to do with another custom taxonomy, but the pbl is that when we print the array in the calendar page (we want to get a monthly archive page listing events with the ajax monthly navigation on top) we get through printer ($cell_events) we don’t see any custom taxonomy showing up !!!
    We need them, either the post-category, or another custom taxonomy because we need to display some associated data (image, some text) linked to another custom post type sharing this taxonomy with the event (there can be only one other custop post type for a taxonomy term).
    How can I get to this toxonomy id ?
    Thank you !

    Thread Starter cfabrice

    (@cfabrice)

    Or another possibility, as we can see in the array that the event-categories are in, would be to assign event-categories to posts – might be simpler…
    Thank you

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I answered you somewhere else just now, please don’t ask the same question in various ways, preferably one thread per unrelated question

    Thread Starter cfabrice

    (@cfabrice)

    Sorry for this ! There was so many possibilities to do this.
    We managed but it is not very orthodox I guess:we just change
    something in line 5 of em-posts.php
    if( !defined('EM_TAXONOMY_CATEGORY') ) define('EM_TAXONOMY_CATEGORY','category'); // instead of if( !defined('EM_TAXONOMY_CATEGORY') ) define('EM_TAXONOMY_CATEGORY','event-categories');
    And then we were able to use the “post category” with the events.
    Thank you for your plugin !

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    i guess it could work (although it may produce errors since we try to creat a taxonomy with a name already in use). rather than edit our plugin, if you add

    define('EM_TAXONOMY_CATEGORY','category');

    to wp-config.php it’ll do the same thing

    Thread Starter cfabrice

    (@cfabrice)

    Ok, I tried but no, this is not working with your last line of code. Doesn’t matter !
    The site works with the trick of sharing the post category among events, and other custom posts but it would be more elegant and easier to publish on it if we were able to use our custom taxonomy (spectacle).
    In another thread you suggested me to follow this agelonwl’s comment.
    So I will try and question on that thread if I have further questions. Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘attach regular categories to events’ is closed to new replies.