List view Widget and List view Mini-Calendar Widget

Home Forums Calendar Products Events Calendar PRO List view Widget and List view Mini-Calendar Widget

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #992555
    Xavier
    Participant

    Hello,

    I’m a bit confused customizing styles and views. For instance, I finished to customize the list view widget the way I wanted it and this is what I’ve got :

    My problem is that in the mini calendar widget, the list view looks like this :

    As you can see, I only miss the event location as shown in the list view widget but I cannot figure out where I’ve got to change this.

    Thank you very much in advance for your help.

    #992854
    Brian
    Member

    Hello,

    Thanks for using our plugins. I can help out.

    By default the Mini Calendar List does not include the Location information.

    It is possible to modify the template in your theme though and get it to show.

    To do that follow our themer’s guide:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    to move this file:

    events-calendar-pro\src\views\pro\widgets\modules\single-event.php

    To this location:

    [your-theme]/tribe-events/pro/widgets/modules/single-event.php

    Once there you want to look to remove these checks:

    <?php if ( isset( $venue ) && $venue && tribe_get_venue() != '' ): ?>

    <?php endif ?>

    So that the information inside of the conditional always shows.

    Let me know if you have any follow up questions.

    Thanks

    #992878
    Xavier
    Participant

    Hello Brian,

    Thanks for the quick response.

    I followed precisely (I guess) your instructions and that doesn’t change anything. So now, instead of this…

    
    <div class="vcard adr location">
    <?php if ( isset( $venue ) && $venue && tribe_get_venue() != '' ): ?>
    <span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?></span>
    <?php endif ?>
    

    I’ve got this…

    
    <div class="vcard adr location">
    <span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?></span>
    

    I’m not sure what you mean by “move the file” though. Do I just have to copy/paste/rename it or do I also have to deleted the original file ?

    I tried everything anyway and that still doesn’t change anything. 🙁

    #993116
    Brian
    Member

    Hi,

    Yeah that change how you did it caused it to show for me.

    You want to keep the file in the plugin and copy to your theme into that exact directory and make the edits there.

    This keeps the file safe from plugin updates and recommended you use a child theme to keep edits safe from theme updates.

    Cheers

    #993248
    Xavier
    Participant

    Ok, so this is exactly what I’ve done and the mini calendar widget still shows only the event’s date/time.

    I’m stuck and don’t know what to do to make this work. 🙁

    Can I send you here in private my site/ftp details for you to have a quick look ?

    #993273
    Xavier
    Participant

    In order to try to move on with this issue, here’s the code of my “single-widget.php” file located in my-theme/tribe-events/widgets/modules.

    
    <?php
    /**
     * Single Event Template for Widgets
     *
     * This template is used to render single events for both the calendar and advanced
     * list widgets, facilitating a common appearance for each as standard.
     *
     * You can override this template in your own theme by creating a file at
     * [your-theme]/tribe-events/widgets/modules/single-widget.php
     *
     * @package TribeEventsCalendarPro
     *
     */
    
    $mini_cal_event_atts = tribe_events_get_widget_event_atts();
    
    $postDate = tribe_events_get_widget_event_post_date();
    
    ?>
    
    <div class="tribe-mini-calendar-event event-<?php esc_attr_e( $mini_cal_event_atts['current_post'] ); ?> <?php esc_attr_e( $mini_cal_event_atts['class'] ); ?>">
    	<div class="list-date">
    		<span
    			class="list-dayname"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_dayname', date_i18n( 'D', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span>
    		<span
    			class="list-daynumber"><?php echo apply_filters( 'tribe-mini_helper_tribe_events_ajax_list_daynumber', date_i18n( 'd', $postDate ), $postDate, $mini_cal_event_atts['class'] ); ?></span>
    	</div>
    
    	<div class="list-info">
    		<?php do_action( 'tribe_events_list_widget_before_the_event_title' ); ?>
    
    		<h2 class="entry-title summary">
    			<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" rel="bookmark"><?php the_title(); ?></a>
    		</h2>
    
    		<?php do_action( 'tribe_events_list_widget_after_the_event_title' ); ?>
    
    		<?php do_action( 'tribe_events_list_widget_before_the_meta' ) ?>
    
    		<div class="duration">
    			<?php echo tribe_events_event_schedule_details(); ?>
    		</div>
    
    		<?php if ( isset( $cost ) && $cost && tribe_get_cost() != '' ) : ?>
    			<span class="tribe-events-divider">|</span>
    			<div class="tribe-events-event-cost">
    				<?php echo tribe_get_cost( null, true ); ?>
    			</div>
    		<?php endif ?>
    
    		<div class="vcard adr location">
    
    				<span class="fn org tribe-venue"><?php echo tribe_get_venue_link(); ?></span>
    
    			<?php if ( isset( $address ) && $address && tribe_get_address() != '' ): ?>
    				<span class="street-address"><?php echo tribe_get_address(); ?></span>
    			<?php endif ?>
    
    			<?php if ( isset( $city ) && $city && tribe_get_city() != '' ): ?>
    				<span class="locality"><?php echo tribe_get_city(); ?></span>
    			<?php endif ?>
    
    			<?php if ( isset( $region ) && $region && tribe_get_region() != '' ): ?>
    				<span class="region"><?php echo tribe_get_region(); ?></span>
    			<?php endif ?>
    
    			<?php if ( isset( $zip ) && $zip && tribe_get_zip() != '' ): ?>
    				<span class="postal-code"><?php echo tribe_get_zip(); ?></span>
    			<?php endif ?>
    
    			<?php if ( isset( $country ) && $country && tribe_get_country() != '' ): ?>
    				<span class="country-name"><?php echo tribe_get_country(); ?></span>
    			<?php endif ?>
    
    			<?php if ( isset( $organizer ) && $organizer && tribe_get_organizer() != '' ): ?>
    				<span class="tribe-organizer">
    					<?php esc_html_e( 'Organizer:', 'tribe-events-calendar-pro' ); ?>
    					<?php echo tribe_get_organizer_link(); ?>
    				</span>
    			<?php endif ?>
    
    			<?php if ( isset( $phone ) && $phone && tribe_get_phone() != '' ): ?>
    				<span class="tel"><?php echo tribe_get_phone(); ?></span>
    			<?php endif ?>
    
    		</div> <!-- .vcard.adr.location -->
    
    		<?php do_action( 'tribe_events_list_widget_after_the_meta' ) ?>
    
    	</div> <!-- .list-info -->
    </div>
    

    Do you see anything wrong ?

    • This reply was modified 10 years, 8 months ago by Xavier.
    #993412
    Brian
    Member

    Hi,

    It should be in this directory:

    my-theme/tribe-events/pro/widgets/modules/single-event.php

    I apologize as it appears the wrong directory is in that template and that is what I also sent you. I have updated my older post as well.

    Please try that out with Pro in the directory.

    Thanks

    #993426
    Xavier
    Participant

    Ok, I found the problem. It came from my WordPress theme which has a different single-event.php than the one shown here above.

    When I bring the modification to that one, it doesn’t work though. Here it is…

    
    <?php
    /**
     * Single Event Template for Widgets
     *
     * This template is used to render single events for both the calendar and advanced
     * list widgets, facilitating a common appearance for each as standard.
     *
     * You can override this template in your own theme by creating a file at
     * [your-theme]/tribe-events/widgets/modules/single-widget.php
     *
     * @package TribeEventsCalendarPro
     * 
     * @cmsms_package 	Welfare
     * @cmsms_version 	1.0.0
     *
     */
    
    ?>
    <div class="cmsms_event_date">
    	<div class="cmsms_event_day"><?php echo tribe_get_start_date(null, false, 'd'); ?></div>
    	<div class="cmsms_event_month"><?php echo tribe_get_start_date(null, false, 'F'); ?></div>
    </div>
    <div class="tribe-events-list-widget-content-wrap">
    	<?php do_action( 'tribe_events_list_widget_before_the_event_title' ); ?>
    
    	<h3 class="entry-title summary">
    		<a>" rel="bookmark"><?php the_title(); ?></a>
    	</h3>
    
    	<?php do_action( 'tribe_events_list_widget_after_the_event_title' ); ?>
    
    	<?php do_action( 'tribe_events_list_widget_before_the_meta' ) ?>
    	
    	<div class="cmsms_widget_event_info">
    		<div class="duration cmsms_theme_icon_time">
    			<?php echo tribe_events_event_schedule_details(); ?>
    		</div>
    		<?php if ( isset( $cost ) && $cost && tribe_get_cost() != '' ) { ?>
    			<div class="tribe-events-event-cost cmsms_theme_icon_money">
    				<?php echo tribe_get_cost( null, true ); ?>
    			</div>
    		<?php } ?>
    	</div>
    	
    	<div class="vcard adr location cmsms_widget_event_venue_info_loc">
    	<?php 
    		if ( 
    			( isset( $venue ) && $venue && tribe_get_venue() != '' ) || 
    			( isset( $address ) && $address && tribe_get_address() != '' ) || 
    			( isset( $city ) && $city && tribe_get_city() != '' ) || 
    			( isset( $region ) && $region && tribe_get_region() != '' ) || 
    			( isset( $zip ) && $zip && tribe_get_zip() != '' ) || 
    			( isset( $country ) && $country && tribe_get_country() != '' ) 
    		) {
    	?>
    		<div class="cmsms_widget_event_venue_info cmsms_theme_icon_user_address">
    
    				<span class="fn org tribe-venue"><?php echo tribe_get_venue(); ?>,</span>
    
    			<?php if ( isset( $address ) && $address && tribe_get_address() != '' ) { ?>
    				<span class="street-address"><?php echo tribe_get_address(); ?></span>
    			<?php } ?>
    
    			<?php if ( isset( $city ) && $city && tribe_get_city() != '' ) { ?>
    				<span class="locality"><?php echo tribe_get_city(); ?></span>
    			<?php } ?>
    
    			<?php if ( isset( $region ) && $region && tribe_get_region() != '' ) { ?>
    				<span class="region"><?php echo tribe_get_region(); ?></span>
    			<?php	} ?>
    
    			<?php if ( isset( $zip ) && $zip && tribe_get_zip() != '' ) { ?>
    				<span class="postal-code"><?php echo tribe_get_zip(); ?></span>
    			<?php } ?>
    
    			<?php if ( isset( $country ) && $country && tribe_get_country() != '' ) { ?>
    				<span class="country-name"><?php echo tribe_get_country(); ?></span>
    			<?php } ?>
    		</div>
    	<?php 
    		}
    		
    		
    		if ( 
    			( isset( $organizer ) && $organizer && tribe_get_organizer() != '' ) || 
    			( isset( $phone ) && $phone && tribe_get_phone() != '' ) 
    		) {
    	?>
    		<div class="cmsms_widget_event_venue_loc cmsms_theme_icon_person">
    			<?php if ( isset( $organizer ) && $organizer && tribe_get_organizer() != '' ) { ?>
    				<span class="tribe-organizer"><?php echo tribe_get_organizer_link(); ?></span>
    			<?php } ?>
    
    			<?php if ( isset( $phone ) && $phone && tribe_get_phone() != '' ) { ?>
    				<span class="tel"><?php echo tribe_get_phone(); ?></span>
    			<?php } ?>
    		</div>
    		<?php } ?>
    	</div>
    	
    	<?php do_action( 'tribe_events_list_widget_after_the_meta' ) ?>
    </div>
    

    Any idea ? Thanks again for your help Brian.

    • This reply was modified 10 years, 8 months ago by Xavier.
    #993576
    Brian
    Member

    Hi,

    I am not sure what your theme provides and why it is not working.

    I cannot troubleshoot a 3rd party modification.

    The best thing to do would be to use the latest version of our template and then add in the customization to that one.

    Thanks

    #997570
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘List view Widget and List view Mini-Calendar Widget’ is closed to new replies.