• Resolved cfabrice

    (@cfabrice)


    We are building a site for a theater. We have spectacles (custom post type). With another great plugin (CPT-onomies )we are using the event custom post type produced by Events-Manager as a taxonomy for our spectacles.
    This means that when we create a spectacle we can assign to it, exactly as you would do with tags to posts, some events (we have created previously one event for every representation of a spectacle).
    We are able to list spectacles and retrieves the events attached to it (http://www.theatredelusine.ch/wp/reservations/)
    We are able to list events and retrieve spectacle and associated data like in our home page – http://www.theatredelusine.ch/wp/ (the first block displays a list of 5 events with associated spectacle data thanks to this code: http://snippi.com/s/qvx6l0o)
    In most of the site we are fine then ! But we have a page in which we want to display a calendar, in a fact a list of the events of a month, with the ajax monthly navigation provided with the plugin. We managed (thanks to David Churchill http://pastebin.com/TLqDER89), to do this, but the problem is that for each event of that list, we want to retrieve the title of the spectacle linked to that event and a few other things that are attached to the spectacle, a bit like on the reservation page.
    But we were unable to mix our code into calendar-full.php so that our list is a bit more rich than just the title of an event !
    Any idea how to do this ?
    We are currently trying to see when an event id appears in the list of events linked to a spectacle and it works. But the thing is then that when you change month with the ajax navigation we loose our functions… and the check we do… see http://www.theatredelusine.ch/wp/evenements
    Another little pbl is how to get rid of the grouped by day thing of the list of David Churchill that we don’t need 😉 – just a plain list of events by month would be fine !
    As you can see we are no great coders but we learn… 😉

    Any help welcome…

    I was thinking of linking post category to event so that we could try to assign the same unique category of a spectacle to its events but I don’t know if that’s the correct way to do it.

    Another option I tried without much success was to create an monthly archive page for events…

    I don’t understand why we could not mix the code we use on the homepage into this calendar-full.php…

    Thank you !

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

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

    (@angelonwl)

    maybe this link can give you an idea on how to work on custom taxonomies – http://wordpress.org/support/topic/plugin-events-manager-using-custom-taxonomies-in-shortcodes?replies=9

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    i’m a little confused… the title is pretty clear, but then your explanation doesn’t seem to mention the need for custom taxonomies (or maybe I missed it).

    if what you want is a monthly list of events with pagination, then use [events_grouped mode=”monthly”]

    if you want to filter by a specific taxonomy, then that’s a little trickier, because to use the above you need to create a custom search attribute, maybe angelonwl’s link will help with that.

    Thread Starter cfabrice

    (@cfabrice)

    Ok, I’ll try to follow agelonwl answer to get that custom taxonomy usable to query associated data. Thank you.

    agelonwl

    (@angelonwl)

    ok, just post any update/question.

    Thread Starter cfabrice

    (@cfabrice)

    Hello !
    we manage to show our custom taxonomy associated with our events thanks to this code

    function my_em_spectacles_event_load($EM_Event){
      $EM_Event->spectacles = wp_get_object_terms( $EM_Event->post_id, 'spectacle' );
    }
    add_action('em_event','my_em_spectacles_event_load',1,1);

    our problem now is that we are on full-calendar page and the ajax navigation when we change month returs the following error
    Fatal error: Cannot use object of type WP_Error as array in (…)/wp-content/themes/reverie/plugins/events-manager/templates/calendar-full.php on line 102
    If we change manually the links in the adress bar (for example the month parameters) the calendar is loaded correctly. It is only when we click on the arrow that we get the error.
    Any idea ?
    Thank you !

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    are you sure the snippet above is the problem causer? e.g. try removing it.

    we don’t have 102 lines in that file, so I’m guessing it’s a customization you made.

    Thread Starter cfabrice

    (@cfabrice)

    You are right, the snippet above is in functions.php.
    But the error we are describing comes from the following line in calendar-full.php
    $spectacleID = $cell_event->spectacles[0]->term_id;
    You can find our full code for calendar-full.php in here
    Thank you !

    caimin_nwl

    (@caimin_nwl)

    Looks to me like the part of the code connected with the arrows is the same in your modified script as it is in the version that comes with the plugin.

    Which probably means there’s something wrong with the bit you customized.

    Thread Starter cfabrice

    (@cfabrice)

    Yes it is ! That’s the mystery we need help with ! When going to the page, the calendar loads nicely without error: monthly list of events with associated data (custom taxonomy, spectacle, image, artistes) but if we click on the nav to get to the next or previous month, we then only get the title of the first event and then the error before any associated data !!!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    I’d say you need to consider hiring a developer to help you out with this. We can’t help you with specific customizations, especially ones this big.

    Try – http://jobs.wordpress.net

    Thread Starter cfabrice

    (@cfabrice)

    We got rid of the ajax and it worked finally !
    Thank you anyway !

    thanks for updating;

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘list of events with monthly pagination and custom taxonomy’ is closed to new replies.