• Resolved cihomewood

    (@cihomewood)


    Hi

    I am currently using the #_EXCERPT placeholder when displaying a list of events, but unlike #_NOTES it strips out all carriage returns, so the resultant text is just a single block.

    Is there any way to get #EXCERPT to leave in the carriage returns? I don’t want to use #_NOTES as the description is often too long for a summary list.

    Thanks

    Ian

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Franky

    (@liedekef)

    The next version of EME will by default do a nl2br (in a smart way) for all generated html output, so that should solve your problem. If you’d like, I can give you a link to the changeset too.

    Thread Starter cihomewood

    (@cihomewood)

    Perfect, thanks Franky. If the new version is out before the end of September I can wait.

    Cheers

    Ian

    Thread Starter cihomewood

    (@cihomewood)

    Hi Franky

    Do you have a release date yet for the next version? If not, I would like to accept your offer of a link for the changeset.

    Thanks

    Ian

    Plugin Author Franky

    (@liedekef)

    The version has been released already. Is it not working as expected? It might be that wordpress already removed the linebreaks first (before I pass over it with the nl2br function I created).

    Plugin Author Franky

    (@liedekef)

    Ok, I verified the code. The “problem” with the breaks disappearing is when you don’t use the more-tag to indicate the end of the excerpt:
    If there’s a more-tag, that gets used as excerpt.
    If there’s no more-tag, the first x characters get used (default 55) but I use the wordpress function wp_trim_words, that also replaces all returns by a space (and removes all html tags).

    So, in short: if you want your excerpt to look the way you want it, you need to use the more-tag.

    Thread Starter cihomewood

    (@cihomewood)

    Thanks Franky, that works. I’ll have to remember not to just use the automatic break.

    Ian

    Plugin Author Franky

    (@liedekef)

    I added that info to the doc too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Excerpt format’ is closed to new replies.