Customize

The questions and answers are displayed through a template that works as you can get used to WordPress template management. If you want to have a unique display, you do not have any other things than you can create a own template in the current (child) theme folder.

  • In the first step:
    Create a my-faq folder in the /wp-content/themes/<current_theme> folder.
  • In the second step:
    From the /wp-content/plugins/my-faq/templates folder, copy all files to the previously created /wp-content/themes/<current_theme>/my-faq folder.
  • In the third step:
    Change files found in /wp-content/themes/<current_theme>/my-faq in the way you want. If the files are available here, the plugin will use it.

The following files are here:

  • index.html
    There is no feature in the display, only reservation.
  • style.css
    Any CSS file in the folder is loaded by the plugin during operation.
  • category.html
    Template that displays the category.
  • query.html
    A template for a question and answer.
  • empty.html
    It will be used when there is no subcategory or question in a category.

There is no JavaScript file among the above. This is because the procedures for operation (opening, closure, counter-related functions) will be inserted from elsewhere. However, if you have a * .js file in this folder, it will be loaded into the plugin. So you can add unique features to the plugin.

Templates work on the principle of simple substitution. Eg in the template:
<h5 class="myfaq-title"><!-- post_title --></h5> will be
<h5 class="myfaq-title">The query title</h5>

For questions, the post array, while in categories, all elements of the term array can be referenced. Similarly, language elements are available:
<!-- lang:There are no questions that can be displayed. -->