Display your FAQ list by using the
[faq] shortcode. The shortcode accepts a few parameters for configuring the display.
[docs-box style=”info”]Values marked with a * are the default values and do not need to be specified[/docs-box]
- order – ASC* (ascending) or DESC (descending)
- orderby – title* or any other accepted value
- posts_per_page -> -1 (all), or some number greater than 0
- group – *blank or the slug of a specific group you’d like to display (Slug is the web-appropriate version of the Group term, which means just letters and numbers, which spaces replaced by dashes)
- skip_group – *false or true. Setting to true will cause the plugin to ignore any FAQ groups and query all the FAQs as one large collection.
- style – *toggle or accordion will control how the FAQ’s are displayed
Formatting the Shortcode
When attributes are used, the format is
attribute=value. For example if I want to specify a single FAQ group to show (or order my groups in a very specific way) and the first group I want to display is Billing, this is what my FAQ would look like:
You can mix and match attributes to customize the look of your FAQ list. Simply separate each attribute with a space
[faq orderby=menu_order style=accordion]
The above shortcode will output the FAQ list in an accordion style and will use the order I set in the FAQ creation screen.
Finding the Slug
When using the group parameter of the shortcode, it requires you provide the group’s slug. The easiest way to get the slug is to go to
yourdomain.com/wp-admin/edit-tags.php?taxonomy=group&post_type=faq. Hover over each group, click the Quick Edit button and grab the value out of the slug box.