How to truncate description for "upcoming events at this venue"

Home Forums Calendar Products Events Calendar PRO How to truncate description for "upcoming events at this venue"

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #32712
    Steve
    Participant

    I’d like to limit the amount of words used in the description for the upcoming events at this venue page. Also I’d like to add the featured image alongside the text as a thumbnail.
    http://miklos.co.uk/venue/theatre-royal-2/
    Any ideas?
    Thanks

    #32733
    Jonah
    Participant

    Hi Steve,

    In order to use a truncated description in the list you’ll need to modify /wp-content/plugins/the-events-calendar/views/list.php and find lines 42-46 where the the_excerpt() and the_content() is called and use a different function for a truncated description. A favorite plugin of mine to help with this is: http://wordpress.org/extend/plugins/advanced-excerpt/

    For adding thumbnails alongside the text in the list, please see this tutorial that I put together: https://theeventscalendar.com/add-the-post-thumbnail-to-your-event-list/

    I hope that helps,
    Jonah

    #45197
    uniondigital
    Participant

    Hi.

    I don’t meant to butt into a thread, but can you please provide an example of how the advanced excerpt plugin would be used in limiting excerpts on the events list view. I’ve tried the following in list.php but no luck:

    and

    and

    Thanks in advance.

    #45230
    Jonah
    Participant

    Hi uniondigital,

    Can you please post code examples to http://snippi.com/

    Thanks,
    Jonah

    #45301
    uniondigital
    Participant

    Hi Jonah.

    Thanks very much for the quick response. Here is a link to the examples:

    http://snippi.com/s/r5f14qa

    Thanks!

    #45343
    Jonah
    Participant

    Hi uniondigital,

    Try this which will first check to see if the the_advanced_excerpt() function exists and if it does, use that function for the excerpt. Otherwise, use the others. http://snippi.com/s/w2xwgl5

    Does that work?

    #45351
    uniondigital
    Participant

    Hi Jonah.

    That worked. Fantastic!

    Thanks for your help on this. I really appreciate it.

    Cheers!

    #45355
    Jonah
    Participant

    You’re welcome uniondigital, let us know if there’s anything else we can do!

    #978917
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘How to truncate description for "upcoming events at this venue"’ is closed to new replies.