Help Desk

Display events on homepage

  • Posts: 28 Topics: 7 Answers: 2
    | Permalink

    Hey guys, I’ve posted this (basic) question on the wordpress forum, but no answer. Can someone please explain me how to display the events on the homepage (or any other page, then the one assigned under settings?)
    Here is my post: http://wordpress.org/support/topic/plugin-the-events-calendar-display-listphp-on-index-page-and-other-pages?replies=1

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hi Tineke. How are you trying to do this, via shortcode embeds? Would one of the widgets work, or is the sidebar not where you want it displayed? Let me know and I can either provide a response directly or get our developer John to take a look.

    Posts: 28 Topics: 7 Answers: 2
    | Permalink

    Hey Rob,

    I don’t want it in a sidebar and no, not via shortcode embed (i thought that wasn’t possible?)
    The thing is that I don’t want to use widgets. I like to hard-code 😉

    Here the website (developing): http://www.hubbicle.in-town.nl/
    It has several loops:
    loop-main
    loop-magazine
    loop-social
    loop-events
    etc..

    I would like to put an events list in loop-events, so I can also show it on the front page and other pages.

    The only thing I got working is http://www.hubbicle.in-town.nl/shows/ thanks to your guide by adding it to a template using the WP CMS.
    But how to show the same somewhere else?

    I tried:
    get(‘eventDisplay’);
    $wp_query->set(‘eventDisplay’, ‘upcoming’);
    $posts = tribe_get_events( ‘numResults=1&eventCat=’);
    $template = TribeEventsTemplates::getTemplateHierarchy(‘widget-featured-display’);
    } ?>

    I tried copying my list.php template into loop-php.

    Tried custom post types:
    ‘events’, ‘posts_per_page’ => 10, ‘orderby’ => ‘date’, ‘order’ => ‘ASC’, ‘paged’ ) ); ?>

    Posts: 28 Topics: 7 Answers: 2
    | Permalink

    Rob?

    Posts: 28 Topics: 7 Answers: 2
    | Permalink

    Solved it…

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Ah, glad to see you got it solved. You posted these messages between the hours I don’t usually come on the forum – if any other issues arise, just give us a shout (with the understanding it may take up to 24 hours for a response) and we’ll try to assist.

    Posts: 3
    | Permalink

    Hello Tineke,

    Can you post the code here to display on the home page. Thanks Muzza

    Posts: 28 Topics: 7 Answers: 2
    | Permalink

    Hey Murray: you can find it here:
    http://pastebin.com/zN4gfeM1 (not sure if pastebin works here, but trying:)

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Pastebin should work here. Thanks, Tineke!

    Posts: 31 Topics: 7 Answers: 1
    | Permalink

    Hi Tineke, your “Upcoming Posts” code is incorrect – you have the orderby=date which will show events by the date you created the posts….I think most people would want to show upcoming events with the event happening the soonest to be the first in the list….and so on…

    So, for anyone hoping to find that in this thread, instead of orderby=date in the query , do eventDisplay=upcoming

    Posts: 31 Topics: 7 Answers: 1
    | Permalink

    Hi Rob, not sure if it’s been mentioned somewhere in the forum yet, but may be a bug….

    When displaying upcoming events via template code, it shows the upcoming events correctly…..until you create a recurring event…..then it messes up the display order the upcoming events.

    Screen shot here: http://yfrog.com/h7zzdmp

    Can John chime in and see if he can confirm the bug please? Hopefully get it fixed in the next version update

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hey Brian. This does look like a legitimate bug; I’ve sent it John’s way to confirm and if so we’ll get it patched for 2.0.2. FYI John is out the rest of the week but once he’s back hopefully we’ll be able to provide a suggestion for the shorter term as we work to fix this for 2.0.2. Sorry about the inconvenience.

    Posts: 3
    | Permalink

    Thanks Tineke now for the fine tuning!

    Posts: 31 Topics: 7 Answers: 1
    | Permalink

    Rob, this bug seems to only be related to one specific version of WordPress (think it was 3.1 something) …

    It’s working perfectly for me now that I upgraded some of my sites to 3.2.1 !

    Thanks, delighted

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Ah excellent to hear – thanks for confirming, Brian. I’ll watch to see if anyone else reports this on 3.2.1, in which case we can re-evaluate it…but sounds like if the update worked for you I’d wager it does for others too. Let me know what else arises on this front.