WordPress.org

Ready to get started?Download WordPress

Forums

FAQ You
Paragraphs or Line Breaks for Answers, Please :) (3 posts)

  1. nick.arpanet
    Member
    Posted 4 years ago #

    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!

    http://wordpress.org/extend/plugins/faq-you/

  2. Gene53
    Member
    Posted 3 years ago #

    I tried the following and it work:
    <br />

  3. phrequency
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags