| 开发者 |
creativewerkdesigns
arpitgshah |
|---|---|
| 更新时间 | 2026年9月18日 18:50 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
[wpfaqblock] shortcode.[wpfaqblock] shortcode.[wpfaqblock]
Display FAQs from one category:
[wpfaqblock category="returns"]
Limit the number of FAQs:
[wpfaqblock category="returns" limit="5"]
Hide the category title:
[wpfaqblock category="returns" category_title="0"]
Change FAQ order:
[wpfaqblock category="general" order="DESC"]
Open the first accordion item by default:
[wpfaqblock category="general" open_first="1"]
Display specific FAQs only:
[wpfaqblock ids="12,34,56"]
Use custom accordion icons:
[wpfaqblock ids="12,34" closed_icon="https://example.com/closed.png" open_icon="https://example.com/open.png"]
Shortcode Attributes
category - Filter FAQs by faq_group term slug. Leave empty to show all FAQs.ids - Comma-separated FAQ post IDs for showing specific FAQs only.limit - Maximum number of FAQs to display. Use -1 to show all matching FAQs.order - Sort order. Accepts ASC or DESC.category_title - Set to 0 to hide the category heading above grouped FAQ output.open_first - Set to 1 to open the first accordion item by default.closed_icon - Image URL for the closed accordion state.open_icon - Image URL for the open accordion state.wpfaqblock folder to /wp-content/plugins/.[wpfaqblock] shortcode.Use the WPFAQBlock Gutenberg block or add the [wpfaqblock] shortcode to any post, page, widget area, or supported template area.
Yes. Each FAQ display can show all FAQs, selected FAQs, or FAQs from selected categories. This lets you reuse one FAQ library across many pages while showing only the most relevant questions.
Yes. The plugin supports category-based FAQ selection, including multiple category selection in supported display and export workflows.
Yes. Use the category title setting in the block or builder controls, or set category_title="0" in the shortcode.
Yes. Enable the open-first option in the display settings or use open_first="1" in the shortcode.
Yes. WPFAQBlock lets you choose custom images for the open and closed accordion states using the WordPress Media Library. If no custom icons are selected, the plugin uses the default icons.
FAQ Schema is disabled by default. You can enable it from WPFAQBlock > Settings. When enabled, WPFAQBlock outputs FAQPage JSON-LD only for FAQs actually displayed on the current page.
WPFAQBlock collects the rendered FAQs and de-duplicates schema output so repeated FAQs are not unnecessarily duplicated in the JSON-LD.
Yes. You can export all FAQs, selected FAQs, FAQs from one category, or FAQs from multiple categories. Imported FAQs can preserve their categories or be assigned to a selected category.
WPFAQBlock can generate FAQ suggestions with OpenAI or Google Gemini. You can generate FAQs from a prompt in the FAQ Builder or from the current editor content while editing a post, page, product, or supported custom post type.
Yes. Add an OpenAI API key or Google Gemini API key in WPFAQBlock > Settings. If both keys are available, the plugin can fall back to the other provider when one provider is temporarily unavailable.
No. WPFAQBlock uses vanilla JavaScript for frontend accordion behavior and admin interactions.
FAQs are stored as a WordPress Custom Post Type (wpfaqblock) and organized with the faq_group taxonomy. This keeps FAQ content compatible with normal WordPress backups, exports, and migrations.
[wpfaqblock] shortcode with category, limit, order, selected FAQ, category title, icon, and accordion attributes.