WordPress.org

Forums

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
    Member
    Posted 3 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?

    http://wordpress.org/extend/plugins/q-and-a/

  2. hiteshanjara
    Member
    Posted 3 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
    Member
    Posted 3 years ago #

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

    <br />

    It will work :)

  4. webbrewers
    Member
    Posted 3 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
    Member
    Posted 3 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
    Member
    Plugin Author

    Posted 3 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>';

    to

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

    I'll be posting an update shortly.

  7. webbrewers
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Q and A FAQ and Knowledge Base for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags