Home › Forums › Calendar Products › Events Calendar PRO › List shortcode bug?
- This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by David.
-
AuthorPosts
-
August 9, 2017 at 7:00 pm #1333218DavidParticipant
I’m getting a really weird thing happen when I use the following event list shortcode.
[tribe_events_list limit="5"]
The first three events give the day-of-week and day-of-month. The last two give the month and the day-of-month. I would like all to show the same thing. Am I doing something wrong? Screenshot attached. The site is https://timucua.com
August 9, 2017 at 9:30 pm #1333259JenniferKeymasterHi David,
Thanks for reaching out – you are not doing anything wrong! I did some testing and was able to recreate the issue on my end. The abbreviation actually switches over for events not in the current month. This was intended to help with clarity, but you should be able to change it with a quick customization.
First, you’ll need to copy the widget’s template into your child theme by following these instructions. The template can be found at wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules/single-event.php.
In the copy of the template inside your child theme, you’ll see the following starting on line 62:
<?php
if (
isset( $instance['tribe_is_list_widget'] )
&& date( 'm', $post_date ) != date( 'm', current_time( 'timestamp' ) )
) :
?>
<span class="list-dayname">
<?php
echo apply_filters(
'tribe-mini_helper_tribe_events_ajax_list_dayname',
date_i18n( 'M', $post_date ),
$post_date,
$mini_cal_event_atts['class']
);
?>
</span>
<?php else: ?>
<span class="list-dayname">
<?php
echo apply_filters(
'tribe-mini_helper_tribe_events_ajax_list_dayname',
date_i18n( 'D', $post_date ),
$post_date,
$mini_cal_event_atts['class']
);
?>
</span>
<?php endif; ?>If you would like only the months to show, you can simply comment out line 65 like this:
// && date( 'm', $post_date ) != date( 'm', current_time( 'timestamp' ) )
If you would like only the days to show, you can replace that code block with the following:
<?php
if (
isset( $instance['tribe_is_list_widget'] )
) :
?>
<span class="list-dayname">
<?php
echo apply_filters(
'tribe-mini_helper_tribe_events_ajax_list_dayname',
date_i18n( 'D', $post_date ),
$post_date,
$mini_cal_event_atts['class']
);
?>
</span>
<?php endif; ?>I hope that helps. Please let me know if you have any questions or need help implementing this!
Thanks,
Jennifer
August 31, 2017 at 9:35 am #1343204Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘List shortcode bug?’ is closed to new replies.