Joel

Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • in reply to: How to return/filter events via rest api #1340856
    Joel
    Participant

    Thanks!

    in reply to: How to return/filter events via rest api #1340127
    Joel
    Participant

    Thanks for your direction Cliff. I was able to filter/return events by passing an array of categories:
    /wp-json/tribe/events/v1/events?categories[]=5&categories[]=3

    From the docs, it doesn’t look like you are able to pass an array of organizers. I’m able to filter events via a single organizer: /wp-json/tribe/events/v1/events?organizer=7

    Is extending this functionality to accept an array of organizers set for a future release?

    Thanks!

    in reply to: WP Rest API Questions #1337853
    Joel
    Participant

    Hi Courtney,

    I’m going to piggy back on this thread since there’s little information on the TEC endpoints.

    Looking through the wp-json/tribe/events/v1/doc it doesn’t look like tribe_organizers are an available endpoint (Ex: /wp-json/tribe/organizers/v1/organizers), correct?

    Am I right in assuming that if it’s not available then we would have to extend the REST API support of it? Is extending this functionality for organizers and venues an upcoming feature release?

    Thanks,
    Joel

    in reply to: Event Submitted Template Community Events #966224
    Joel
    Participant

    Hi Nico,

    Sorry, perhaps I wasn’t clear in my explanation. I’ve already done that. I created a customized page template and already made the changes at the settings that you and I mentioned.

    I’ve done a great deal of customization to most of the views in the free and pro version of The Events Calendar and the page template that I created is very bare on purpose. If I make any changes to that template then I’d have to re-structure everything.

    I understand that when a user submits a new event using the Community Events Add-on or they edit a previously published event via the Community Events Add-on they are directed to the template we mentioned and is set at Settings > Display > Events Template. My situation is, in my opinion, this is a problem with the Community Event Add-on because it is extremely limiting when it comes to theming and providing a customized user experience.

    Why, instead of just using the template at Settings > Display > Events Template, doesn’t the Community Events Add-on have it’s own Views Template for anything submitted or edited like submitted-event.php or something similar. Is this the role of the file default-placeholder.php in the add-ons views folder (the-events-calendar-community-events/views/community/default-placeholder.php)?

    in reply to: Get rid of empty paragraph tags in messages #188818
    Joel
    Participant

    Thanks for your help and updates. I’ve added the fix and it resolved the issue. I would appreciate an update once the bug is fixed, so I can allow your plugin to do it’s magic. Cheers!

    in reply to: Altered a function where should I put it? #131786
    Joel
    Participant

    I’m guessing other people have/will be looking for a way to add dates to the calendar on the list page so here’s the function that I added in my theme’s function.php file:

    function add_date_to_events_calendar($html){
    $html = ”;
    global $post, $wp_query;
    $event_year = tribe_get_start_date( $post, false, ‘Y’ );
    $event_month = tribe_get_start_date( $post, false, ‘m’ );
    $event_day = tribe_get_start_date( $post, false, ‘j’ );

    if ($wp_query->current_post > 0) {
    $prev_post = $wp_query->posts[$wp_query->current_post – 1];
    $prev_event_year = tribe_get_start_date( $prev_post, false, ‘Y’ );
    $prev_event_month = tribe_get_start_date( $prev_post, false, ‘m’ );
    $prev_event_day = tribe_get_start_date( $prev_post, false, ‘j’ );
    }
    /*
    * If the event month changed since the last event in the loop,
    * or is the same month but the year changed.
    *
    */
    if ( $wp_query->current_post === 0 || ( $prev_event_month != $event_month || ( $prev_event_month == $event_month && $prev_event_year != $event_year ) ) ) {
    $html .= sprintf( “<span class=’tribe-events-list-separator-month’><span>%s</span></span>”, tribe_get_start_date( $post, false, ‘F Y’ ) );
    }
    /*
    * If this event year is different to the year of the previous event in the loop,
    * and it’s not it’s not the first event in the loop (we don’t want to start the loop with a year separator)
    */
    if ( $wp_query->current_post > 0 && $prev_event_year != $event_year ) {
    $html .= sprintf( “<span class=’tribe-events-list-separator-year’>%s</span>”, $event_year );
    }
    /*
    * If the event day changed since the last event in the loop,
    * or is the same day but the month changed.
    *
    */
    if ( $wp_query->current_post === 0 || ( $prev_event_day != $event_day || ( $prev_event_day == $event_day && $prev_event_month != $event_month ) ) ) {
    $html .= sprintf( “<span class=’tribe-events-list-separator-month’><span>%s</span></span>”, tribe_get_start_date( $post, false, ‘j l’ ) );
    }
    return $html;
    }
    add_filter( ‘tribe_events_list_the_date_headers’, ‘add_date_to_events_calendar’ );

    in reply to: 400 Bad Request #131769
    Joel
    Participant

    I was also able to resolve the conflict be deactivating the Custom Post Type Permalinks Plugin. My website doesn’t heavily rely on the plugin but it would be helpful to find a fix since it seems like many people use it.

    in reply to: Altered a function where should I put it? #130386
    Joel
    Participant

    Great, thanks!

    in reply to: 400 Bad Request #129885
    Joel
    Participant

    I’m getting the same 400 Bad Request with the %tribe_events_slug% showing after the domain name. I noticed the problem after I had installed the community events addon, too.

    Running WP 3.8.2 and your most recent release of the event calendar pro.

Viewing 9 posts - 1 through 9 (of 9 total)