Q and A FAQ and Knowledge Base for WordPress
[Plugin: Q and A - FAQ Plugin] Problem: Multiple paragraphs in answer are all clumped together (7 posts)

  1. reidwalley
    Posted 4 years ago #

    I have multiple paragraphs in my answers, but they end up being displayed as one giant paragraph.

    Multiple <p>s look great on the back-end, but are all clumped together on the front-end.

    How can I get the answer portion of the front-end to display multiple paragraphs?


  2. Anjara
    Posted 4 years ago #

    You can try to separate those <p> tag, using css code.

    Here you can add this type of css in your style.css file at theme folder.

    p { clear:both; margin-bottom:5px; }

    Hope this will help you!

  3. sparklyscotty
    Posted 4 years ago #

    If you put in line breaks in teh HTML in the FAQ like

    <br />

    It will work :)

  4. webbrewers
    Posted 4 years ago #

    No, if you add tags they get stripped out so that won't work. Same problem here but only when an faq category is added to a page. When the individual faq is opened, the formatting is there. So that suggests to me the page is using the_excerpt instead of the_content. I'll poke around but if someone has a fix I'd appreciate it.

  5. webbrewers
    Posted 4 years ago #

    I should add formatting is stripped which suggests the problem is the_excerpt but ALL the content is shown, not an "excerpt". So it's hard to pin down.

  6. Dalton Rooney
    Plugin Author

    Posted 4 years ago #

    Sorry, this happened with the latest update, we changed the way the query works and it's no longer filtering the content. To fix, change line 123 in q-a.php from

    $qa_shortcode .= '<div class="faq-answer">' . get_the_content() . '</div>';


    $qa_shortcode .= '<div class="faq-answer">' . apply_filters( 'the_content', get_the_content() ) . '</div>';

    I'll be posting an update shortly.

  7. webbrewers
    Posted 4 years ago #

    Awesome, that fixed it. Thanks for the quick response.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic