If you put a link it puts a "\" in front of " so the link does not work
If you put a link it puts a "\" in front of " so the link does not work
"Fixed" the links by using phpadmin and modifying the entries directly
open wp-content/plugins/simple-faq/faq.php
Find this:
function DisplayFAQ() {
global $wpdb;
$table_name = $wpdb->prefix . "faq";
$select = "SELECT * FROM " . $table_name ." ORDER BY answer_date DESC";
$all_faq = $wpdb->get_results($select);
$buf = '<ol>';
foreach ($all_faq as $q) {
$buf .= '<li>' . $q->question . '<br />';
$buf .= $q->answer.'</li>';
}
$buf .= '</ol>';
return $buf;
}
replace with this:
function DisplayFAQ() {
global $wpdb;
$table_name = $wpdb->prefix . "faq";
$select = "SELECT * FROM " . $table_name ." ORDER BY answer_date DESC";
$all_faq = $wpdb->get_results($select);
$buf = '<ol>';
foreach ($all_faq as $q) {
$buf .= '<li>' . stripslashes($q->question) . '<br />';
$buf .= stripslashes($q->answer).'</li>';
}
$buf .= '</ol>';
return $buf;
}
The author forgot stripslashes (TERRIBLE!)
The plugin works great actually, just not commented well in the installation screen. After activating, you will find "FAQ" in the admin panel under "PLUGINS" menu. I'm running v2.8.3. and all is well.
To make the list a little more stylable with your theme, replace the code in faq.php with this (which also includes removing the escape character "\" slash too as mentioned above):
function DisplayFAQ() {
global $wpdb;
$table_name = $wpdb->prefix . "faq";
$select = "SELECT * FROM " . $table_name ." ORDER BY answer_date DESC";
$all_faq = $wpdb->get_results($select);
$buf = '<ol class="FAQ">';
foreach ($all_faq as $q) {
$buf .= '<li>' . stripslashes($q->question) . '<br /><span class="answer">';
$buf .= stripslashes($q->answer).'</span></li>';
}
$buf .= '</ol>';
return $buf;
}
I added a class for the ordered list item item called "FAQ" to define just that list and also added a span to include a class called "answer" to format just the answer.
Hope this helps.
Nice plugin. Thank you.
You must log in to post.