Support » Plugin: FAQ You » [Plugin: FAQ You] Paragraphs or Line Breaks for Answers, Please :)

  • nick.arpanet


    Excellent Plug-in! I find it visually appealing for content as well as FAQ. Qustion: Is there a way to force line breaks in the Answer, so you can have paragraphs. Some of my answers are long, and without paragraphs, are horrible looking. Without parapgraphs, this awesome plug-in is unusable. 🙁 If html is an option, I know how to take it from there- any insight or suggestions would be appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I tried the following and it work:
    <br />

    If you modify the faq.php file you can make this work.

    What I did was change line 14 to become:
    $new_content = $content;
    I removed the strip_tags() function allowing html to be passed into the variable.

    Then on lines 156,157 and 161,162, change the <p> tags to <div> tags
    so it becomes:

    $new_content .= '<div class="faq-question"><a name="question-'.$question->id.'">'.$question->question.'</a></div>';
    $new_content .= '<div class="faq-answer">'.$question->answer.'</div>';

    If you don’t change the p to div, then when you try and put other html in the faq things get all wacky.

    Then, on line 424, you can change the height (style=”height: 400px;”) of the textarea that you enter the faq answer into on the admin screen:
    <textarea id="content" name="faq_answer" style="height: 400px;"><?php echo $edit_question->answer?></textarea>

    NOTE: I rarely like to mess with the core files in a plugin, just remember if you make these changes, and update the plugin at a later time, your changes will be lost.

    Also, I don’t use this plugin to allow users to enter FAQs but rather just admins, not sure what this does to the front end form users can use to fill out the FAQs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: FAQ You] Paragraphs or Line Breaks for Answers, Please :)’ is closed to new replies.