Customize display of events list widget

Home Forums Calendar Products Events Calendar PRO Customize display of events list widget

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #13033
    dan
    Member

    trying again. every time I post my discussion the site gives me an error. the post never shows up. when I try to repost it, it tells me it’s a duplicate.

    Hi I am trying to accomplish something where I can display a list of upcoming events for the current day with some pagination links below it exactly like this image here which I believe is using this plugin:

    Can someone point me in the right direction. Ive already created a template and edited it, but it is displaying the date for every event instead of grouping them together.

    View post on imgur.com

    can I do this by just creating a loop and calling the custom post type for events?

    #13043
    Anthony D’Arco
    Participant

    I was just wondering the same thing.

    #13075
    Rob
    Member

    Hey Dan. That’s an odd error; if you want to send me your credentials (rob at tri.be) and some steps to recreate I will give it a go. I haven’t been able to recreate it but if it’s a problem with the forum we definitely want to get it patched up.

    Not sure how to do this (it’s going to require some customization), but I’ll get one of our devs to take a look and see if they can offer up any suggestions. I know that such functionality has been requested a few times so it’ll likely make it into the official code base at some point or another as well.

    #13105
    Jonah
    Participant

    Hey Dan, can you post some code samples and maybe a link where I can see what you’ve got (or even a screenshot) in place now?

    Thanks,
    Jonah

    #13107
    dan
    Member

    hi thanks here is the link

    http://gteh.ca/yorkregion

    it’s below the headline post.

    here is the code I’m using:

    [code]

    <li >

    <?php
    $space = false;
    $output = '';
    echo '’ . tribe_get_start_date( $post->ID, $start ) . ”;

    if($event->AllDay && $start) {
    //echo ‘ (‘.__(‘All Day’,’tribe-events-calendar-pro’).’)’;
    } else {
    if ( $end && $event->EndDate != ”) {
    echo ” . __(‘Ends’, ‘tribe-events-calendar-pro’) . ‘ ‘;
    echo tribe_get_end_date($post->ID);
    }
    }
    ?>

      

    &lt;a href=&quot;"&gt;post_title ?&gt;</a>

    [/code]

    #13122
    Jonah
    Participant

    Hi Dan,

    This is a pretty customized development request and while we won’t be able to offer an exact solution I’ve got an idea of how this could work.

    1. Setup your query to only pull in today’s events – you can do this with WP_Query or tribe_get_events and pass in the start_date and end_date parameters to be today’s date. If you’re using WP_Query make sure to pass in ‘post_type=tribe_events’ to only query for the events post type.

    2. I would setup numerous instances of this in different panels that are hidden and shown via jQuery in some way. Each panel would contain the same query but the start_date/end_date would be different.

    3. Hard code in the “pagination” by linking to the separate panels via jQuery.

    That should work but you’ll have to customize and figure out the particular scripts to get everything working.

    I hope that helps,
    Jonah

    #13166
    dan
    Member

    ok great thanks that helps. I can just use wp_query and call what I want then and treat it as any other custom post type.

    #13170
    dan
    Member

    How do I pass the start_date and end_date into tribe_get_events? can you show an example of that? the basic tribe_get_events query needed to pull in events with today’s start date? the rest of it I can handle.

    #13188
    Jonah
    Participant

    Hey Dan, you should be able to pass it like so:


    'start_date'=>'1/9/2012',
    'end_date'=>'1/9/2012'

    #13251
    dan
    Member

    awesome, thanks again.

    And I assume I can grab today’s date using php’s date() function, store it in a variable and then use that with start_date so it always grabs “today” ?

    #13277
    Jonah
    Participant

    Hey Dan, yep you got it, just get todays date stored in a variable and use that. It should work.

    #975076
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Customize display of events list widget’ is closed to new replies.