• Resolved dikra71

    (@dikra71)


    Hello,

    I would like to display additional information in some events, but not all. Specifically, I would like to show the excerpt (the_excerpt()) only for events that have one, while keeping the description disabled.

    Currently, the Events Layouts module only allows me to display the description, but I don’t see an option to choose the content type.

    Is there a way to:

    1. Disable the description completely?
    2. Choose whether to display the excerpt instead?
    3. Ensure that only events with an excerpt display it, while others remain empty?

    I would really appreciate any guidance on how to achieve this, whether through built-in settings or custom modifications.

    Thank you in advance for your help!

    Best regards,

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

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

    (@vishali009)

    Hi @dikra71

    Thanks for reaching out! I understand that you want to show the excerpt for events that have one while keeping the description completely disabled.

    To do this, you’ll need to make two small changes to your plugin files: Update ecmd_event_layout.php

    Go to:
    Event Calendar Modules For Divi>> Includes>> Modules >>EventsLayouts>> templates >>ecmd_event_layout.php

    Find lines 64-66 and replace them with this:

    $event_post = get_post($event_id);
    $ecmd_exerpt_data = $event_post->post_excerpt;
    $event_content = '<!-- Event Content --><div class="ecmd-event-content">';
    $event_content .= $ecmd_exerpt_data;
    $event_content .= '</div>';
    


    Update list_style2.php

    Go to:
    Event Calendar Modules For Divi>>Includes>>Modules>>EventsLayouts>>Templates>> list_style2.php

    Find lines 67-69 and replace them with this:

    if ( $show_description === 'on' && !empty($event_content) ) {
        $events_html .= $event_content;
    }
    

    This makes sure that only events with an excerpt will display it—if there’s no excerpt, nothing will be shown.

    After making these changes, the description will be completely disabled, and only events that have an excerpt will display it.

    For more, you can refer to the screenshots.

    Screenshot 1
    Screenshot 2

    Let me know if you need any help!

    Plugin Support vishali009

    (@vishali009)

    Hi there,

    I just wanted to follow up and see if the solution we provided worked for you. Since we haven’t heard back, I’ll close this ticket for now.

    If you still need any help, feel free to open a new ticket—we’re always happy to assist you!

    Thanks for reaching out, and have a great day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.