The [faq] shortcode can be used to include a FAQ group from the FAQs > Frequently Asked Questions list.
1 2 3 |
[faq id="123"] |
By default, the [faq] shortcode includes Questions sorted by title. You can change the default sort order using the 'order' and 'orderby' shortcode attribute.
1 2 3 |
[faq id="123" order="ASC" orderby="menu_order"] |
See the Order and Orderby Parameters section in the WordPress WP_Query code reference for additional information on these WordPress query attributes.
You can change the default heading level and the FAQ title using the 'heading' and 'title' attributes.
1 2 3 |
[faq id="123" heading="h2" title="Alternate FAQ Title"] |
The 'show_answer_nums' attribute can be used to show one or more answers by default when the "Click Question to Show/Hide Answer" option is enabled.
1 2 3 |
[faq id="123" show_answer_nums="1, 2"] |
The 'show_answer_ids' attribute can be used to show one or more answers (by question ID) by default when the "Click Question to Show/Hide Answer" option is enabled.
1 2 3 |
[faq id="123" show_answer_ids="456"] |