Home Forums Front-end Issues Can't display custom field on Event


Can't display custom field on Event

  • Hi,

    I’m using MEC events plugin but I want to show a custom secondary-excerpt for our TV Signage. Right now it’s only showing the date and title under each event but I want the ability to add a my own wording under the title (

    Anyways, I’ve created the custom field and I’ve tried to put it under the specific event template php but no matter what I do I can’t make it display. My php knowledge is very basic so I tried to mimic code that is displaying the featured image.

    Towards the bottom I added the new class called tv-excerpt and my goal is to recall the custom field name signage_excerpt that I created in wordpress.

    I appreciate any feedback and help!

     <?php elseif($this->style == 'classic'): ?>
                <div class="mec-event-image"><?php echo $event->data->thumbnails['medium']; ?></div>
                <div class="mec-event-content">
                    <?php if(isset($settings['multiple_day_show_method']) && $settings['multiple_day_show_method'] == 'all_days') : ?>
                        <div class="mec-event-date mec-bg-color"><?php echo date_i18n($this->date_format_classic_1, strtotime($event->date['start']['date'])); ?></div>
                    <?php else: ?>
                        <div class="mec-event-date mec-bg-color"><?php echo $this->main->date_label($event->date['start'], $event->date['end'], $this->date_format_classic_1); ?></div>
                    <?php endif; ?>
                    <h4 class="mec-event-title"><a class="mec-color-hover" data-event-id="<?php echo $event->data->ID; ?>" href="<?php echo $this->main->get_event_date_permalink($event->data->permalink, $event->date['start']['date']); ?>"><?php echo $event->data->title; ?></a><?php echo $event_color; ?>
    				 <h4 class="tv-excerpt"><?php echo $event->data->the_field['signage_excerpt']; ?></h4>
                    <p><?php echo trim((isset($location['name']) ? $location['name'] : '').', '.(isset($location['address']) ? $location['address'] : ''), ', '); ?></p>
Viewing 1 post (of 1 total)

The topic ‘Can't display custom field on Event’ is closed to new replies.