Paragraph breaks (or other HTML) not being respected in summary events page

Home Forums Ticket Products Event Tickets Plus Paragraph breaks (or other HTML) not being respected in summary events page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #913552
    cweeds
    Participant

    Hi team,

    When looking at a summary page of events, it seems the event descriptions are munging all the HTML, bold, paragraphs, etc, in the entry:
    http://cellarjazzsociety.com/events/
    https://www.dropbox.com/s/2o7clf3k8pksp8d/summary.png?dl=0

    However, when viewing the full event, all seems to display as it should:
    http://cellarjazzsociety.com/event/eh-seamus-blake-plays-the-music-of-eddie-harris-feat-geoffrey-keezer-2/
    https://www.dropbox.com/s/2pur19vzir5nwhx/individualevent.png?dl=0

    Can you guys assist in determining what the issue might be?

    Regards,

    Luis

    #913615
    George
    Participant

    Hey Luis,

    Sorry you’re having troubles here. Just to make sure I fully understand the extent of your issues here, do you mean that you want to ensure that the styling of your event excerpts persists in the list view the same way it does in the single event view?

    For example, if I view the single event for this event here → http://cellarjazzsociety.com/event/eh-seamus-blake-plays-the-music-of-eddie-harris-feat-geoffrey-keezer-2/ I see bold text describing all the musicians participating in the event. Here’s a screenshot to be specific → http://i.imgur.com/mCEdbjm.png

    Now, on the list view of all the various events, this bold text shows up, but not in bold, in the list view, as you show in your screenshot here → https://www.dropbox.com/s/2o7clf3k8pksp8d/summary.png?dl=0

    Now, just to be clear: is your issue that you want that text to remain, and be bold, or is that info about the musicians not even part of the excerpt, and shouldn’t be showing up in the list view in the first place?

    Apologies for my confusion here, I just want to understand your issue precisely so we can help you fix it. Thanks for the screenshots already, and any insight you can provide here.

    Cheers,
    George

    #913644
    cweeds
    Participant

    That’s correct. Also, <p> tags not being respected, or <br> tags for that matter.

    Regards,

    Luis

    #913648
    cweeds
    Participant

    The text that is displaying is all correct, just that line breaks, paragraph breaks, and bold text is gone.

    #914262
    George
    Participant

    Hey Luis,

    Thanks for clarifying that. Excerpts are a bit of a pain in WordPress, for some mysterious reason they’re just built pretty darn badly. By default, for example, WordPress aggressively filters HTML and such out of excerpts, which is useful but a little presumptuous about where & how users are going to use their excerpts.

    So, unfortunately, the only way to get around this is to overwrite the default excerpt code being used within Events Calendar 🙁

    This is actually pretty simple thanks to the template override system within Events Calendar (and EC Pro) – basically, you’ll need to create a new file in your theme and modify the code a bit.

    Implementing this in numerous places across your site, if needed, is something you’ll have to take the reins on, but here’s an overview of doing it with the List view specifically:

    • create a custom directory in your theme to override the default plugin files from Events Calendar. Specifically, you’ll want to make a folder called /tribe-events/ then another folder within that called /list/, and finally, within this /list folder, you’ll want to create a file called single-event.php. To summarize: /{your-theme}/tribe-events/list/single-event.php

    • once this file is created, go to your plugins directory. Find a the following file: /the-events-calendar/views/list/single-event.php

    • Copy all of this original file into your new theme file.

    • Around line 79 or so of this new file in your theme, you should find the following code:

    <?php the_excerpt(); ?>

    • Replace that with this:

    <?php echo wp_trim_excerpt( get_the_content() ); ?>

    For more information on overriding plugin files and such, definitely check out our Themer’s Guide here → https://theeventscalendar.com/support/documentation/events-calendar-themers-guide/

    That has all the information you’ll need in regards to making customizations like this.

    This fix worked for me on my local testing site and should work for you too – let us know if it does! Backup your site and files if you think of it, and take your time to play around with this. You can replicate these steps for any other “view” (map view, month view, etc.) if needed.

    Cheers,
    George

    #949968
    George
    Participant

    Hello,

    This issue’s been sitting here a while so I’m going to go ahead and close it for now – if other issues arise, don’t hesitate to come back and open a new ticket, and if you need to open a new ticket about the same issues you originally brought up here, please share a link to this original ticket so we can pick up where we left off.

    Cheers!
    George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Paragraph breaks (or other HTML) not being respected in summary events page’ is closed to new replies.