WordPress FAQ Plugin (CMFAQ) - Shortcodes
FAQ Shortcodes
TIP: What Are Shortcodes
Shortcodes add dynamic content to your site via a small piece of code.
Learn more: Shortcodes - How To Use | Finding ID of Post/Page/Other Content
This user guide covers shortcodes available in the WordPress FAQ plugin.
FAQ With All Categories
To display FAQ with all categories use the shortcode [cm_faq]
To show only selected lists, use the
list
parameter with name or slug of the list[cm_faq list="general-wordpress,general-magento"]
Displaying FAQ with all categories
All Questions
Use [cm_faq_all]
to display a list with all questions. You can further customize this list with parameters.
Parameters
Show only questions from selected categories - use
category
with name or slug or list of names or slugs of the categories[cm_faq_all category="WordPress,technology"]
Displaying questions of chosen categories Order displayed questions - use the
orderby
parameter with voting or title value to order by voting or question titleExample:
[cm_faq_all orderby="title"]
Ordering displayed questions by titles [cm_faq_all orderby="voting"]
Ordering displayed questions by votes Limit the number of displayed questions - use
number=x
. By default, there's no limit.[cm_faq_all number="10"]
Displaying certain amount of questions To enable or disable accordion view - use
accordion
attribute with 0 or 1 value to specify the accordion appearance of QA list items.If set active (1), it can overwrite general appearance settings and is configured via tab option Appearance > Accordion. You can choose separate icons for collapsed and expanded view and change the icon size.
More information can be found here.
[cm_faq_all accordion="0"]
Disabling the accordion view [cm_faq_all accordion="1"]
Enabling the accordion view
Example With All Parameters
[cm_faq_all category="Technology" orderby="title" number="3" accordion="1"]

Show Questions List From the Same Category
Note: this shortcode was introduced in version 1.8.0.
You can display the list of questions of the same category on the question page. It can be done using the shortcode[cm_faq_same_category_questions]
You can either add this shortcode to every question page, or to make it easier, you can place the shortcode as a widget to the sidebar. The list of related questions will be displayed only on the question pages. It will show only relevant questions from categories that the current question belongs to.
[cm_faq_same_category_questions]


Parameters
- Order displayed questions - use the
orderby
parameter to sort the questions by one of the following parameters:date
- order by question publish date (default).voting
- order by question voting.title
- order by question title.modified
- order by question modify date.menu_order
- order by Order field of question post.rand
- random order.
[cm_faq_same_category_questions orderby="title"]

- Order direction - use the
order
parameter to define the direction of sorting - either ascending (the value "asc") or descending (the value "desc"). The default order direction is ascending if used withorderby="title"
, otherwise the default order direction is descending.
[cm_faq_same_category_questions orderby="title" order="desc"]

- Limit the number of displayed questions - use the
number
parameter to limit the amount of displayed questions.
[cm_faq_same_category_questions orderby="rand" number="3"]

TIP
The title above the questions list can be change in the Plugin Labels settings.

![]() |
More information about the WordPress FAQ Plugin Other WordPress products can be found at CreativeMinds WordPress Store |
![]() |
Let us know how we can Improve this Product Documentation Page To open a Support Ticket visit our support center |