• Resolved ES Neubauer

    (@es-neubauer)


    Hi,
    Looking to display the event excerpt in the Events list widget. I was able to add an excerpt by copying the events.php to my child theme, adding a line of code, and overriding the template file according to the TEC docs. But, the excerpt seems to be pulled from the page that the widget is on, rather than the excerpt from the event. This is the code I added:

    <p class=”excerpt”> <?php the_excerpt(); ?></p>

    Can anyone point me in the direction of the correct line of code here?

    Thanks,
    Erica

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support masoodak

    (@masoodak)

    Hi @es-neubauer,

    Thanks for reaching out!

    Kindly try replacing the line of code you have added the following and see if that helps,

    <p class="excerpt"><?php echo tribe_events_get_the_excerpt($event->ID); ?></p>

    This line of code will go to the following file in your theme,

    /wp-content/themes/[your-theme]/tribe/events/v2/widgets/widget-events-list/event.php

    Let me know if this helps.

    Kind regards,
    Masood

    Thread Starter ES Neubauer

    (@es-neubauer)

    Perfect, that worked! Thanks so much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display excerpt in Events List Widget’ is closed to new replies.