Posterboard length annd 'Read More'

WordPress Event Management, Calendars & Registration Forums General Question Posterboard length annd 'Read More'

This topic contains 4 replies, has 2 voices, and was last updated by  Simon Harris 10 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14334

    Is it possible to alter the number of words in the Posterboard boxes and add ‘Read More’?

    Thanks for the help.
    🙂

    Simon Harris
    #14338

    Hi Simon,

    The description of the event is based on the excerpt. But you can use the filter eventorganiser_posterboard_item to alter each event as it’s passed back to the client. (See https://github.com/stephenharris/Event-Organiser-Posterboard/blob/1.1.0/event-organiser-posterboard.php#L264)

    Please note that the next update will introduce a breaking change. event_content currently produces the excerpt. In the next update this shall be renamed to event_excerpt and event_content shall instead produce the full event content.

    The loadng / load more text is currently hardcoded (although translatable) but you can find them on the line 81-82.

    Stephen Harris
    #14346

    Thanks for that Stephen, however when I was asking about the ‘Read More’ I was referring to the bottom of each
    poster/box.

    Thanks again

    Kind regards
    Simon

    Simon Harris
    #14352

    Sorry, misread the question.

    The ‘read more’ link is added as part of the excerpt, and is typically done by the theme via the excerpt_more filter. This applies to all post types, everywhere that there’s an excerpt.

    (The number of words in the description is filtered by excerpt_length, but this too is site-wide)

    It may be better to use the eventorganiser_posterboard_item filter and replace the event_content with the content as returned by get_the_content() and trimmed (perhaps using wp_trim_words()– see codex. )

    Stephen Harris
    #14389

    Perferct thank you Stephen

    Simon Harris
Viewing 5 posts - 1 through 5 (of 5 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.