Widget – view all events

Home Forums Calendar Products Events Calendar PRO Widget – view all events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1145459
    Rob Bennett
    Participant

    Hi

    I am really excited about launching my new site on Monday with the new Events Calendar pages.

    The widget i think works particularly well. There is one thing though that would be a great improvement. I have days where there are more than 5 events on. I think for neatness just showing the next 5 events works but would it be possible to include a ‘view all X events’ at the bottom (like the month view) if you click on a day which has >5 events?

    Thanks
    Rob

    #1145799
    Geoff B.
    Member

    Good evening Rob and welcome back!

    Thank you for reaching out to us.
    I would love to help you with this topic.

    would it be possible to include a ‘view all X events’ at the bottom (like the month view) if you click on a day which has >5 events?

    That’s a great question. As it turns out, the very architecture of our plugin has been thought out to allow customization.

    You might want to read our Themer’s guide to get a sense of how that works.

    Basically, by tweaking the month view in your own version of it (under the /tribe-events/ folder of your WordPress theme), you should be able to achieve just that.

    As a starting point, you can start by reading the following: https://theeventscalendar.com/knowledgebase/show-all-events-on-all-days/

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1145861
    Rob Bennett
    Participant

    Hi Geoff

    After reading the support forums I went back to the documentation. What I am asking for is actually a function the events calendar is shipped with. I have been into:
    /wp-content/plugins/events-calendar-pro/src/views/pro/widgets/list-widget.php and there is the following code:

    // The URL for this widget's "View More" link.
    $link_to_all = tribe_events_get_list_widget_view_all_link( $instance );
    
    // Check if any posts were found.
    if ( isset( $posts ) && $posts ) :
    
    	foreach ( $posts as $post ) :
    		setup_postdata( $post );
    		do_action( 'tribe_events_widget_list_inside_before_loop' ); ?>
    
    		<!-- Event  -->
    		<div class="<?php tribe_events_event_classes() ?>">
    			<?php tribe_get_template_part( 'pro/widgets/modules/single-event', null, $instance ) ?>
    		</div>
    
    		<?php do_action( 'tribe_events_widget_list_inside_after_loop' ) ?>
    
    	<?php endforeach ?>
    
    	<p class="tribe-events-widget-link">
    		<a href="<?php esc_attr_e( esc_url( $link_to_all ) ) ?>" rel="bookmark">
    			<?php esc_html_e( 'View More&hellip;', 'tribe-events-calendar-pro' ) ?>
    		</a>
    	</p>
    
    <?php

    I cannot see why it isn’t working. Any thoughts?

    Thanks
    Rob

    #1146405
    Geoff B.
    Member

    Good evening Rob,

    Thank you for writing back.

    Actually, you are on the right track to achieving what you are looking for.
    The code you pointed does display a “show all events” link.

    However, it does so for the list widget, not the mini-calendar widget (that you are using in the screenshot).

    The files that generate the mini-calendar (and it’s ensuing attached list – which is different than the actual list widget) is detailed under the widget section of : https://theeventscalendar.com/knowledgebase/themers-guide/ 

    So in other words, I am absolutely certain that what you want can be accomplished via a bit of customization to the mini-calendar view.

    As an alternative, you could hire one of our recommended customizers to do the customization for you.

    That being said, I can totally see how that would be a cool feature.
    In fact, you can suggest it in our User Voice forum. That way others can vote on it too!

    Best regards,

    Geoff B.

    #1154908
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Widget – view all events’ is closed to new replies.