WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Events List Has No Loop (6 posts)

  1. Ashby
    Member
    Posted 1 year ago #

    I recently activate the Events Calendar Plugin.

    I went in to make my css modifications, and created a custom template for my Events page.

    For some reason the Events page is showing only one event instead of a list of five events. It shows one event for the default template as well as my custom template.

    Current plugin is standard and not pro. Please help!

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Hey there Ashby. Thanks for the note here; is it possible you hadn't set the number of events posts to just 1? This is a specific setting you need to configure under Events -> Settings: http://d.pr/i/McMj. If you set that to "5", it should display properly on the frontend.

    Give that a go and let me know if you're still having problems. Thanks for your patience so far.

  3. Ashby
    Member
    Posted 1 year ago #

    Thanks for the response roblagatta.

    I wish that were the case, but the number of events post was set at 10 in the Events Settings.

    The fix we found was on line 26 of list.php:

    Original—

    <?php if (have_posts()) : ?>
    <?php $hasPosts = true; $first = true; ?>
    <?php while ( have_posts() ) : the_post(); ?>
    <?php global $more; $more = false; ?>

    New—

    <?php if (have_posts()) : ?>
    <?php $hasPosts = true; $first = true; ?>
    <?php $query = new WP_query(array('posts_per_page'=>10,'post_type'=>'tribe_events'));
    ?>
    <?php while ( $query->have_posts() ) : $query->the_post(); ?>
    <?php global $more; $more = false; ?>

    I don't know why the settings options wasn't working for me, but it looks like it might only be applicable to my site dev. :)

    Thanks for the help.

  4. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Thanks for the follow-up here, Ashby. Sorry to hear the 'out of the box' solution wasn't working...but from the looks of things you've found a workaround, correct?

    Let me know if not and if you're still having problems here. Otherwise, if you think we can mark this RESOLVED, let me know and I'll take care of it.

  5. Ashby
    Member
    Posted 1 year ago #

    Resolved.

  6. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Fantastic to hear! Thanks for confirming as much, Ashby, and for using The Events Calendar. If we can do anything else down the road just let us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic