Show date range or add custom field in EVENT LIST SHORTCODE

Home Forums Calendar Products Events Calendar PRO Show date range or add custom field in EVENT LIST SHORTCODE

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1042622
    Jill Carter
    Participant

    Howdy, I LOVE the addition of the shortcodes, very, very useful.

    We are using the tribe_events_list shortcode to create a list of upcoming events on our home page. We would love to display a list showing the range of dates for that event, not just the first date of the event. Is it possible to edit the template for the date listing to show the first date and last date of a recurring event?

    Or is it possible to display a custom field in the shortcode? That way we could just enter the date range in the custom field and display it, instead of the standard start date and end time.

    Let me know if either are possible and how we might go about implementing either of those solutions.

    Thanks for your consideration.
    Cheers!

    #1043172
    Jill Carter
    Participant

    I figured it out! I thought for sure this must of been an issue addressed on your forums already, I just couldn’t find it. But I kept digging and found this article https://theeventscalendar.com/knowledgebase/add-event-content-to-an-event-widget/ on how to add the excerpt to the list view and that takes care of all my needs!

    Thanks!

    #1043183
    Nico
    Member

    Hi there Jill,

    I was about to reply when I saw your newest post. Glad to hear you could sort this out. I’ll include my reply anyway in case it helps you out (or any other folk looking for this in the future).

    It’s possible to create a template override the list widget template, which is located at wp-content/plugins/events-calendar-pro/src/views/pro/widgets/modules/single-event.php. Be sure to check the themer’s guide for details on how to do this. Once you have the template override in place you can add the following code to display the additional field. In this case the field is called ‘sample field’:

    <?php $cf = tribe_get_custom_field('sample field'); ?>
    <?php if ( isset( $cf ) && $cf != '' ): ?>
    <span class="tribe-events-cf"><?php echo $cf; ?></span>
    <?php endif; ?>

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Show date range or add custom field in EVENT LIST SHORTCODE’ is closed to new replies.