FAQ Plugin Short Code Methods

Home / Guides / FAQ Plugin for WordPress / FAQ Plugin Short Code Methods
Lesson 3 of 6
3m read.
Beginner

FAQ Structured Data

Our FAQ Plugin has two short codes that can be used in the Classic editor, Elementor or Gutenberg.

  • Toggled FAQ – Creates an FAQ accordion 
  • Multi Column FAQs – Creates a multi column grid of FAQ items

The Toggled FAQ Short Code

Toggled FAQ shortcode
Toggled FAQ Short Code Output

Toggled FAQ Short Code lists the FAQ Items in an accordion layout. 

The Short Code snippet for FAQ List:

Short Code Attributes for FAQ List

  1. id: Main container CSS ID of the generated Html. Default is toggled-faqs
  2. class: Main container CSS classes. Class toggled-faqs are appended to the class list.
  3. include_categories: A comma-separated list of category IDs. Only faqs from this category list are shown.
  4. expanded: The default state of the faq toggle. Set to 1 to expand all faqs. Set to 0 to close all faqs. Default is 0.
  5. orderby: Sort retrieved faqs by parameter. Defaults to date. Following are the available options:
    • ‘none‘ – No order
    • ‘ID‘ – Order by faq id. Note the capitalization.
    • ‘author‘ – Order by author.
    • ‘title‘ – Order by title.
    • ‘name‘ – Order by faq name (faq slug).
    • ‘type‘ – Order by faq type
    • ‘date‘ – Order by date.
    • ‘modified‘ – Order by last modified date.
    • ‘parent‘ – Order by faq/page parent id.
    • ‘rand‘ – Random order.
    • ‘comment_count‘ – Order by number of comments
    • ‘menu_order‘ – Order by Page Order. The order field is in the Edit Page Attributes box
  6. order: Designates the ascending or descending order of the ‘orderby‘ parameter. Defaults to ‘DESC’. Available options are:
    • ‘ASC‘ – ascending order from lowest to highest values (1, 2, 3; a, b, c).
    • ‘DESC‘ – descending order from highest to lowest values (3, 2, 1; c, b, a).

Multi Column FAQ Short Code

Multi Column FAQ Shortcode
Multi Column FAQ Shortcode

This short code lists the FAQ Items in a grid layout.

The Short Code Snippet for FAQ Grid: 

Short Code Attributes for FAQ Grid

  1. id: Main container CSS ID of the generated Html. Default is multi-col-faqs
  2. class: Main container CSS classes. Class multi-col-faqs are appended to the class list.
  3. include_categories: A comma-separated list of category IDs. Only faqs from this category list are shown.
  4. group_by_categories: Boolean value. Set it to 1 to group the faq listing by category. Set 0 to have a simple faq listing. Default is 1.
  5. columns: Set the number of columns for the grid. Allowed values are 1, 2, 3, and 4. Default is 3
  6. orderby: Sort retrieved faqs by parameter. Defaults to date. Following are the available options:
  • ‘none‘ – No order
  • ‘ID‘ – Order by faq id. Note the capitalization.
  • ‘author‘ – Order by author.
  • ‘title‘ – Order by title.
  • ‘name‘ – Order by faq name (faq slug).
  • ‘type‘ – Order by faq type
  • ‘date‘ – Order by date.
  • ‘modified‘ – Order by last modified date.
  • ‘parent‘ – Order by faq/page parent id.
  • ‘rand‘ – Random order.
  • ‘comment_count‘ – Order by number of comments
  • ‘menu_order‘ – Order by Page Order. The order field is in the Edit Page Attributes box

7. order: Designates the ascending or descending order of the ‘orderby‘ parameter. Defaults to ‘DESC’. Available options are:

  • ‘ASC‘ – ascending order from lowest to highest values (1, 2, 3; a, b, c).
  • ‘DESC‘ – descending order from highest to lowest values (3, 2, 1; c, b, a).