I ran into a bug with The Events Calendar dealing with limiting the number of events listed in "list view."
I've created a custom query on my home page to list the 5 next upcoming events:
<?php query_posts('category_name=Featured Events&posts_per_page=5&eventDisplay=upcoming'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <div class="graphic"> <div class="month m-<?php echo the_event_start_date(d,d,'m'); ?>"></div> <div class="date d-<?php echo the_event_start_date(d,d,'d'); ?>"></div> </div> <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <div class="entry"> <?php the_excerpt(); ?> </div> </div> <?php endwhile; ?> <div class="moreLink"> <a href="<?php bloginfo('siteurl'); ?>/category/events/" title="View more events.">More events »</a> </div> <?php else: ?> <div id="noPosts"> No upcoming events at this time. </div> <?php endif; ?>
I noticed that using
posts_per_page=5 in the query does not work. You have to change the "Blog pages show at most" setting in the Reading Settings for the blog to limit the number of Event posts displayed. This in itself is annoying, as I do not want to limit every post page to 5 posts. Is there any to get the
posts_per_page argument to work?
Anyways, the actual bug lies in the fact that when you do change the "Blog pages show at most" setting, for some reason it also limits the number of posts displayed in the back-end admin panel. In the admin panel, If you navigate to Posts, and then filter all of your posts by the "Events" category, it only displays 5 posts. It also does not provide the normal pagination to view the rest of the posts.
So, you can't access all the post in the "events" category while filtering the posts by a category. You can only edit these posts by flipping through the pages for all posts.
Has anyone else run into this? Is this an issue with the plugin or WordPress?