« See all FAQs for Sabai Discuss - Q&A forum plugin for WordPress
How do I add my custom content at the top/bottom of the questions index page?
There are several ways to do this:
1. %sabai% placeholder
Go to the Pages section in the WordPress dashboard, and edit the page you have specified for the Questions Index Page in Questions -> Settings -> Pages. In the content section of the page, you can use the %sabai% placeholder which will be replaced with the content of the plugin. For example:
<p>My custom header</p> %sabai% <p>My custom footer</p>
This will however affect other pages in the plugin as well, so if you do not like that then you should assign different pages for Category List and Single Question pages in Questions -> Settings -> Pages.
2. sabai_questions_before_questions/sabai_questions_after_questions action hooks
You can add the following action hook functions to your theme functions.php or a new file at wp-content/sabai/functions.php:
To add your custom content above listings:
add_action('sabai_questions_before_questions', 'my_sabai_questions_before_questions', 10, 2);
function my_sabai_questions_before_questions($addonName, $settings)
{
if ($settings['category'] === 0) { // the main index page does not have a category
echo '<p>My custom header</p>';
}
}
To add your custom content below listings:
add_action('sabai_questions_after_questions', 'my_sabai_questions_after_questions', 10, 2);
function my_sabai_questions_after_questions($addonName, $settings)
{
if ($settings['category'] === 0) { // the main index page does not have a category
echo '<p>My custom footer</p>';
}
}
3. questions_questions.html.php template file
You can edit the questions_questions.html.php file which you can find under wp-content/plugins/sabai-discuss/assets/templates and add any custom content anywhere in the template file. Please see the following FAQ for more details on how to customize the display with template files.http://codecanyon.net/item/sabai-discuss-plugin-for-wordpress/3455723/faqs/18756