Support » Plugins » Hacks » Help with events list using posts

  • Hi everyone,

    I need some help coding an events page on a website I’m building in wordpress. If you look at the attached image this is how they want it to look.
    (please ignore the black line!)

    I’d like to use posts to show these events so can anyone tell me what loops I can run to make the above possible? I know how to add loops for latest posts, and how to add featured images too so the thumbnails aren’t a problem.

    My main problem is how can I list events that are in the future with the correct date next to them, and how can I make them move to the ‘events that have happens’ column on the left once they have passed?

    Any help/advice on this would be really appreciated! Struggling to get the results wanted.

    thanks in advance!

Viewing 1 replies (of 1 total)
  • Seem to have solved this issue now. I included a normal latest posts loop on the left hand side complete with featured image.

    for the right hand loop i used this code:

    $my_query = new WP_Query('post_status=future&order=ASC&showposts=5');
    if ($my_query->have_posts()) {
    while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <?php the_post_thumbnail(array(100,100), array ('class' => 'alignleft')); ?>
    <?php the_title(); ?>
    <?php the_time('g a') ?>
    <?php the_time('l, F jS, Y') ?>
    <?php the_excerpt(); ?>
    <?php endwhile;

    This forces scheduled posts to be displayed so the writer would just schedule a post for the exact date the event was going to happen.

    When the ‘event happened’ or the post became published it moved to the left hand side because it was now being show in the recent posts loop instead.

    Hope this helps anyone with a similar problem.

Viewing 1 replies (of 1 total)
  • The topic ‘Help with events list using posts’ is closed to new replies.