Customize List View to be separated by Month

Home Forums Calendar Products Events Calendar PRO Customize List View to be separated by Month

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #930583
    simoncarr
    Participant

    By default List View shows all upcoming events with a Month header.

    What I would like to accomplish is list out the upcoming months at the top, but only display events for the current month. For example, all Jan events appear and if you clicked the ‘Feb’ link at the top, the events for Feb would load.

    Any insight on how to accomplish this? I’m not looking for jquery tabs integration, just way to list upcoming event months and link to the list view for each month.

    <!-- Month / Year Headers -->
    		<?php tribe_events_list_the_date_headers(); ?>
    		
    
    		<!-- Event  -->
    			<div id="post-<?php the_ID() ?>" class="<?php tribe_events_event_classes() ?>">
    			<?php tribe_get_template_part( 'list/single', 'event' ) ?>
    		</div><!-- .hentry .vevent -->

    I am guessing ‘tribe_events_list_the_date_headers’ needs to be altered somehow. Any help would be greatly appreciated!

    #930643
    Barry
    Member

    Hi!

    The first thing I have to note is that this is basically a customization question and we’re fairly limited in terms of how much support we can offer for that sort of thing.

    I’m happy to discuss some ideas and  point you in the right direction as best I can, but please do be aware that it is largely something you will need to drive forward by yourself 🙂

    What I would like to accomplish is list out the upcoming months at the top, but only display events for the current month. For example, all Jan events appear and if you clicked the ‘Feb’ link at the top, the events for Feb would load.

    So it sounds in essence like you want to build out a custom month view, albeit presenting the information in a list format rather than a grid.

    Have you thought of basing your work on the existing month view (since it already limits the result set to one month at a time) and reformatting it? Our Themer’s Guide is a good starting place for some essential background information if you want to explore this (or indeed a number of other customization techniques).

    Alternatively, it would be possible to intercept and modify the list view query to only show a single month at a time. A solid working knowledge of WP_Query would be required in order to do that.

    just way to list upcoming event months and link to the list view for each month.

    How you do this might to some extent depend on how you handle the first part of this.

    Our URLs tend to follow a fairly uniform pattern (ie, example.com/events/month/2015-06) and so you could craft these “manually” (not literally by hardcoding them, but by writing a short script that appends a date string to the end of an otherwise fixed URL) or else you could make use of various helper functions, such as tribe_get_event_link().

    I am guessing ‘tribe_events_list_the_date_headers’ needs to be altered somehow. Any help would be greatly appreciated!

    I’m not sure that’s how I’d go about it – unless we’re picturing very different approaches to the problem – but I guess it’s possible there are further avenues here, too.

    Good luck!

    #938191
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Customize List View to be separated by Month’ is closed to new replies.