Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey there mogito. The code is actually not showing: https://d.pr/i/iyfs. Would you mind re-posting and we can try to assist from there?

    Thread Starter mogito

    (@mogito)

    Ooooh, thats strange:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Thread Starter mogito

    (@mogito)

    <?php
            global $post;
             $all_events = tribe_get_events(array(
             'eventDisplay'=>1,
             'posts_per_page'=>-1
                ));
              foreach($all_events as $post) {
              setup_postdata($post);
               ?>
               <span class="Event-Date"><?php the_date(' F j, Y'); ?></span>
             <?php the_title(); ?>
              <?php } //endforeach ?>
              <?php wp_reset_query(); ?>

    Hey Mogito,

    You can control the number of events to display with the posts_per_page parameter. Currently you have it set to ‘-1’ which will show unlimited events. Change this to ‘1’ if you only want one event to display.

    The eventDisplay parameter takes the following values: ‘past’, ‘upcoming’, ‘day’, ‘all’, ‘month’. 1 is not a valid value so either remove the parameter or use one of the above values.

    FYI, tribe_get_events is documented in full here: https://tri.be/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events

    I hope that helps!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: The Events Calendar] Evenets calendar listing’ is closed to new replies.