Adding more than 1 photo in Month view

Home Forums Welcome! Pre-Sales Questions Adding more than 1 photo in Month view

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #992658
    Trisha Hanke
    Guest

    I am doing work on a paint party website, and I’d like to use Event Calendar Pro + Woo Tickets. The only problem is that we need each event to show the featured image in the month view. I read how to add 1 featured image to the month view, but there are days when 3-4 events happen on the same day and we need a photo to show for each in month view…here is as n example of what we’re trying to do: http://www.pinotspalette.com/chesterfield/classes

    Please let me know if this is possible, and if so how to do it. Thank you!

    #992836
    Geoff
    Member

    Hi Trisha and thanks for getting in touch! I hope The Events Calendar and WooCommerce Tickets wind up being the right fit for the site you’re working on. 🙂

    Good question and nice work finding this tutorial as a starting point. You can certainly edit the code in that tutorial to display the featured images for all events on a particular day, regardless of whether there is more than one event, which would look something like this:

    <?php if ( has_post_thumbnail() ?>
    <div class="tribe-events-event-thumb"><?php echo get_the_post_thumbnail( $post->ID, array(90,90) );?></div>
    <?php endif; ?>

    Does this help answer your question? Please feel free to let me me know if you have any follow-up questions here and I’d be happy to help as best I can. 🙂

    Cheers!
    Geoff

    #993230
    Trisha
    Guest

    This code did not work – the original code in the tutorial works perfectly:
    <?php if ( has_post_thumbnail() && 1 == $day[‘total_events’] ) : ?>
    <div class=”tribe-events-event-thumb”><?php echo get_the_post_thumbnail( $post->ID, array(90,90) );?></div>
    <?php endif; ?>

    …but this code only displays one events thumbnail image. So I just need to know how to tweak this code above to make all events each day show thumbnails in month view. Thank you again for your assistance!

    #993266
    Geoff
    Member

    Hi Trisha,

    My snippet is a tweak to the original snippet from the tutorial but had a typo:

    <?php if ( has_post_thumbnail() ) ?>
    <div class="tribe-events-event-thumb"><?php echo get_the_post_thumbnail( $post->ID, array(90,90) );?></div>
    <?php endif; ?>

    Cheers!
    Geoff

    #993279
    Trisha
    Guest

    Thanks Geoff.

    Got it to work…just one more typo in the code, for whoever might need it in the future. It was just missing the : in the first line of code. Thank you so much for your help!!

    Here is the working code:

    <?php if ( has_post_thumbnail() ) : ?>
    <div class=”tribe-events-event-thumb”><?php echo get_the_post_thumbnail( $post->ID, array(90,90) );?></div>
    <?php endif; ?>

    #993423
    Geoff
    Member

    Ah shoot! So sorry for my poor typing and thanks so much for sharing the correct code with us here. I’m stoked to hear you got this to work smoothly–nice going!

    I’ll go ahead and close this thread but please do feel free to hit us back up if any other questions come up–we’d be happy to help. 🙂

    Cheers!
    Geoff

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Adding more than 1 photo in Month view’ is closed to new replies.