Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    Unfortunately, for submitted testimonials, you will have to edit them and reinstate the paragraphs. I will find out if it’s possible to save the line breaks from the form text area.

    Thread Starter melliatto

    (@melliatto)

    Ok, thank you. But I have entered some testimonials manually in the wp-admin backend (with line-breaks) and when viewing the posts in wp-admin, the paragraphs/line-breaks are preserved. But they disappear when viewing the testimonials on the site frontend. ? That’s the problem.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Sorry, I misunderstood. What theme are you using? Can you check quickly in a default theme like TwentyFifteen and report what happens?

    Thread Starter melliatto

    (@melliatto)

    Ok, I switched to TwentyFifteen theme and still no line-breaks. In wp-admin backend, the testimonials contain <br /> tags, but when viewing the front-end HTML source, the <br /> tags are not there. I tried with <p> tags also.

    I’m guessing, maybe the plugin is stripping HTML tags on output? Is there a way the plugin can still strip html tags but allow <br />, <p>, and maybe even <a> anchor links?

    Thanks for looking in to this.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Good guess. The plugin strips HTML tags to prevent open tags when using the length attribute. I can see how tags are useful so I will try to add an option to strip tags or not.

    When I use natural (non-tag) line breaks in the editor, they carry through when displayed. If that does not happen for you then maybe something is disabling wpautop?

    Thread Starter melliatto

    (@melliatto)

    Ok thank you. Yes that would really be great if you could add the option to strip tags or not! I think that would improve the plugin even better than it already is!

    I look forward to the option in future updates! Thanks so much.

    Great plugin! Great work!

    Plugin Contributor Chris Dillon

    (@cdillon27)

    I was not clear. It only strips tags when the length attribute is used or the wpmtst_truncate template function is used. Full testimonials or excerpts should not have tags stripped.

    To prove it, use the Plugins > Editor to comment out the strip_tags in the plugin’s functions.php like so:

    //$content = strip_tags( $content );

    Thread Starter melliatto

    (@melliatto)

    Oh, ok I see. Yes, now I understand.

    I Am using the length attribute so that’s why. And I kinda need to continue using the length attribute because my testimonials are very long.

    I suppose for now, I’ll edit the plugin’s functions.php and comment out the call to strip_tags(). And I’ll just remember to do this on future updates, unless you end up fixing this in future updates.

    Again, Thanks so much for your help and the great plugin! ??

    Thread Starter melliatto

    (@melliatto)

    How can I donate? ??

    Plugin Contributor Chris Dillon

    (@cdillon27)

    You’re kind. No donation is necessary but I would appreciate a nice rating & review. And keep the ideas and feedback coming!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to show line-breaks between paragraphs.’ is closed to new replies.