Homepage customization / including upcoming and past events

Home Forums Calendar Products Events Calendar PRO Homepage customization / including upcoming and past events

Viewing 15 posts - 1 through 15 (of 34 total)
  • Author
    Posts
  • #10520
    Adam
    Member

    Hi! I created a non-public version of my client’s site in order to get everything hunky-dory with the new TEC; once that’s working, I’ll switch everything over. It’s almost all working, except for the all-important home page. Right now, nothing shows up at all there.

    http://designerblowout.ca/blowout/

    I used to have upcoming events (a thumbnail and the excerpt) on my homepage, followed by titles only of past events. That’s what I’d like to duplicate. It can still be seen at the active, live site, running 1.6.5 of TEC:

    http://designerblowout.ca/

    I’ve seen discussions here re: including events on the homepage. Unfortunately I can’t quite wrap my head around what I’ve seen. I don’t need to mix “normal posts” and events, the site is all events, but my old custom index.php is clearly irrelevant now. Trouble is, I have no idea how to fix it or which file to steal the code from. Standard “Query_posts” stuff I could handle. But I’m lost now.

    Once I have this sorted, I’ll be ready to rock. Hope someone can help! Thanks!

    Adam

    #10560
    Rob
    Member

    Hey Adam. I can try and help you out here; this one is probably best to have our developer, John, take a look at. He’s out today and tomorrow but is back addressing support issues over the weekend, so I should be able to get you a response on this by Monday or Tuesday. Apologies I couldn’t offer up anything in the shorter term.

    #10563
    Adam
    Member

    Thanks Rob, it’s definitely gratifying to know that help is on the way!

    By way of a little more detail and background, I have tried using the code in this post on my home.php:

    http://wordpress.org/support/topic/plugin-the-events-calendar-display-listphp-on-index-page-and-other-pages?replies=1

    But I find that it produces a list of ALL events, starting with the upcoming ones and just continuing down the line with past ones. Ouch!

    I also see some code in there that sort of cryptically refers to the list.php template:

    Yet it’s inactive due to the comment marks, and when I remove them just for fun, I get a notice on the resulting page that there are “no upcoming events” – even though viewing the proper events page, I get an accurate and correct list!

    Yikes.

    So, bottom line, as I’ve said, I guess I’m out of my depth here…. the old copy and paste tricks not working. Client is quite keen (to put it mildly) to have his site working right – so really looking forward to assistance in the next few days. Thanks!

    #10617
    Rob
    Member

    Excellent. That’s extremely helpful; thanks for the follow-up. It definitely doesn’t sound to be behaving as it should.

    #10758
    Adam
    Member

    Hey Rob – any chance of some feedback over the next day or so? Thanks!

    #10773
    Rob
    Member

    Hey Adam. Still got a dev looking at this (he was out last week, so we’re a bit backlogged)…and have just sent it to someone else to see if he’s got any feedback, so we can expedite things. Should definitely have a response over the next day or two – apologies for the delay in the interim.

    #10776
    Adam
    Member

    No worries, thanks for the swift update!

    #10788
    John
    Member

    Hi Adam,

    To accomplish what you are looking for you should be able to do in 2 custom queries:

    $upcoming = tribe_get_events( array(‘eventDisplay’=>’upcoming’) );

    $past = tribe_get_events( array(‘eventDisplay’=>’past’) );

    You can loop through those events like you would with any get_posts call.

    #10838
    Adam
    Member

    Thanks John! However, I just need a tiny bit more help to implement this as I don’t yet know what to do with these isolated snippets. I’ve only really used query_posts up to now and don’t know the syntax for custom queries. I did an online search, but see lots of VERY different approaches – using WP_Query, a “Custom Select Query”, etc.

    I’m going to have to finally settle in with a good WP book and dig deep into these sorts of beyond-the-basics customizations. But in the meantime… could you kindly share the full code for getting my excerpts?

    THANK YOU!

    #10879
    Adam
    Member

    Hmm, my “THANK YOU!” was meant to be exuberant but now looks more passive-aggressive… anyhoo, I’ve had a whack at it but nothing’s happening…. here is my no-doubt-totally-muddled attempt… can you point me in the right direction? Thanks!

    ’past’) );
    $custom_posts = get_posts($past);
    foreach($custom_posts as $post) : setup_postdata($post); ?>

    <?php the_title('‘, ‘‘); ?>

    <?php
    if ( has_post_thumbnail() ) {
    echo '‘;
    the_post_thumbnail(‘listingThumb’);
    echo ‘
    ‘;
    the_excerpt();
    } else {
    echo the_excerpt();
    }
    ?>

    #10880
    Adam
    Member

    Whoa, that code didn’t paste very well. Here it is on Pastebin:

    http://pastebin.com/RJ308YB8

    #10883
    Adam
    Member

    OK, sorry for the last 2 extraneous posts but here is my NEW, most successful attempt; however, I’m still getting only the same, past events in both loops:

    http://pastebin.com/2FYqAbgk

    Here is how it looks:

    http://designerblowout.ca/blowout/

    I’ve created a new event in December but it doesn’t show up….

    Thanks again!
    adam

    #10895
    Rob
    Member

    Hey Adam. Just a heads up that I’ve got John looking at this now, so he should have a response for you shortly.

    #10911
    Adam
    Member

    Thanks so much Rob. My client is getting super-antsy!

    #10912
    Adam
    Member

    Since I know this is going to come up, perhaps I should mention now that once the front page loops are working, I also need to replicate one other kind of loop I was using before – on certain pages, intended for e-mailouts, where I extract only upcoming events in particular categories. It was all based on the old “standard” query_posts code but I can tell that it won’t work that way now (though my custom categories are still there, and ready to be checked, on Event posts). So if I can also get direction on how to show only upcoming events from a particular category, that would be great. Thanks!

Viewing 15 posts - 1 through 15 (of 34 total)
  • The topic ‘Homepage customization / including upcoming and past events’ is closed to new replies.