• Resolved ensiomarjamaa

    (@ensiomarjamaa)


    Hello and thank you for this great plugin!

    I am trying to show my post excerpt but it displays it without any of the html formatting of my post. I tried to use a custom excerpt but it gave the same result – no line breaks, links or styles…

    I read that this is a flaw in WordPress core but there are workarounds. What is your suggested one?

    I tried to use a plugin called Advanced Excerpt but it didn’t do anything.

    I’m not much of a developer so I would prefer to use plugins. I can make simple html and css fixes though.

    Here’s my shortcode if it matters:
    [display-posts order=”desc” post_type=”post, page” posts_per_page=”1″ wrapper_class=”latest-news-excerpt” include_title=”false” wrapper=”div” include_excerpt=”true” excerpt_length=”40″ excerpt_more=”… Read more” excerpt_more_link=”true”]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    I wouldn’t say this is a flaw; this is a feature of WordPress. The excerpt is a small summary of the post without any styling. If you want styling, use include_content=”true”.

    If you do use the Advanced Excerpt plugin, you’ll need to remove the excerpt_length and exerpt_more parameters from the shortcode.

    The excerpt length parameter causes our shortcode to strip all styling, then crop the excerpt to the length you specify. Removing those parameters tells Display Posts Shortcode to display the raw, unaltered excerpt.

    Thread Starter ensiomarjamaa

    (@ensiomarjamaa)

    Thank you for the reply. Removing the length and more parameters gave me the result I was after when I was using the Advanced Excerpt plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excerpt to keep html in output’ is closed to new replies.