Excerpt length in View

Home Forums Calendar Products Events Calendar PRO Excerpt length in View

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1508592
    Sundco Team
    Participant

    Events Calendar Pro Support,

    We just moved up to the Pro version and it’s great. I have a question about controlling the length of the excerpt in Photo view (numbers of characters or words). I’ve experimented and we can paste a custom excerpt into the Excerpt field in the WordPress editor. But we’d like to auto-generate an excerpt with fewer words (or characters) from the Description.

    It looks like the excerpt is created by the function tribe_events_get_the_excerpt(). How can we control how many words (or characters) it takes from the description?

    Thank you,

    Mark Sund, Studio Director, Sund + Co (Cincinnati USA)

    #1508610
    juanfra
    Keymaster

    Hey There,

    Thank you for reaching out to us! And thanks for the kind words.

    You can use the excerpt_length filter in order to set the number of words you’d like to have in your excerpt.

    Please try adding the following code to your theme functions.php file:

    https://gist.github.com/juanfra/6b2ca7f3ef44b107b13e6bb3a9fa2914

    Best,

    Juan.

    #1508615
    Sundco Team
    Participant

    Juan,

    Thank you. I’ve inserted it in functions.php, and cleared the server-side cache, but it doesn’t seem to be working. Perhaps my error but I’m heading out for the day and will fiddle with it more tomorrow.

    Mark

    #1509053
    juanfra
    Keymaster

    Hi Mark,

    Thank you for the follow-up.

    I’ve updated the code I shared with you, in order to set a priority number for that function, and that will make it work.

    Please let me know how it goes.

    Best,

    Juan.

    #1526316
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Excerpt length in View’ is closed to new replies.