Home > Documentation > Customizing SabaiDiscuss

Customizing SabaiDiscuss

Customizing Fields

As of version 1.1.0, SabaiDiscuss allows you to manage fields of almost any content in SabaiDiscuss. You can modify the default settings of core fields, i.e. fields that are provided by default by SabaiDiscuss, such as the title, body, and tags input fields, and also create new fields not only for questions but for answers, categories, and tags as well.

Fields can be managed from the Manage Fields tab in each of the Questions, Answers, Categories, and Tags administration pages. There you will see a visual form editor with already defined fields on the main content section and a list of avaialble fields on the right side.

To add a new field, simply click on the name of the field you would like to add on the available fields list. To edit a field, simply hover over the field you would like to edit and click the settings button (the one with a cog icon). To delete a field, you can click on the delete field button highlighted in red.

Core Fields (Questions)

These are the fields that are predefined for questions and may not be removed.

  • Guest Author
  • Title
  • Body
  • Category
  • Tags
  • Featured Question
  • Close Question

Core Fields (Answers)

These are the fields that are predefined for answers and may not be removed.

  • Guest Author
  • Title
  • Body

Core Fields (Categories)

These are the fields that are predefined for question categories and may not be removed.

  • Title
  • Parent Category
  • Description

Core Fields (Tags)

These are the fields that are predefined for question tags and may not be removed.

  • Title
  • Description

Available Fields

These are the fields that you can use to create custom fields.

  • Choice
  • Date
  • HTML
  • Markdown Text
  • Number
  • ON/OFF
  • Paragraph Text
  • Single Line Text

Customizing Output

Customize Template Files

As of version 1.1.0, SabaiDiscuss includes template files that you can modify to customize the output. The template files are located under the directory at wp-content/plugins/sabai-discuss/lib/Questions/templates.

You can copy these files over to wp-content/themes/[Your Theme]/sabai directory and modify however you like to override the default output. Note that you do not need to copy all the template files over to your theme folder, but only those you want to make changes.

Here is the list template files included:

  • questions_answers.html
  • questions_answers_list.html
  • questions_answers_single_favorited.html
  • questions_answers_single_flagged.html
  • questions_answers_single_full.html
  • questions_answers_single_preview.html
  • questions_answers_single_summary.html
  • questions_categories_list.html
  • questions_categories_single_full.html
  • questions_categories_single_summary.html
  • questions_custom_fields.html
  • questions_list.html
  • questions_single_favorited.html
  • questions_single_flagged.html
  • questions_single_full.html
  • questions_single_preview.html
  • questions_single_summary.html
  • questions_tagcloud.html
  • questions_tags_single_full.html

Customize Styles

In addition to copying template files, if you place a stylesheet file at wp-content/themes/[Your Theme]/sabai/style.css, this file will be read after all the SabaiDiscuss stylesheets are read. So use this file if you need to ensure that your custom styles are applied after the styles defined by the SabaiDiscuss core.