| 开发者 | saumya010 |
|---|---|
| 更新时间 | 2026年10月10日 01:04 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
Q: ... / A: ... prefixed lines (Question: and Answer: also work, in any capitalisation)## Question followed by the answer text1. or a - at the start of a question does not end up inside the question text.
You see a preview of what was parsed — which format it recognised, how many questions, and the first few pairs — before anything is added. Then choose to append to the existing questions or replace them. Either way it is a single undo step.
The preview is there so you can check the pairing before you commit. When the block spots that your text is not one of the formats above — leftover columns from a spreadsheet, comma-separated values, or a run of alternating lines that does not pair up evenly — it says so and imports nothing rather than importing it wrongly. It cannot detect every unusual layout, so give the preview a quick look before adding.
Built to stay out of the way
<details> and <summary> markup. Expanding and collapsing works with JavaScript disabled.FAQPage data describing your questions, which AI assistants read when deciding what to cite. Google retired FAQ rich results in May 2026, so this is for machine readability — not search snippets.<summary> elements, wrapped in a heading of your chosen level by default (or a plain <span>, if you pick that). They are reachable with Tab, toggled with Enter or Space, and show a visible focus outline. The open and closed state is conveyed by the browser natively rather than being simulated.
Who this is for
Yes, optionally — it is off by default, and you should know what it does and does not do before switching it on.
Google retired FAQ rich results on 7 May 2026. The expandable question boxes that used to appear under a search listing are gone, for every site, including the government and health sites that kept them after Google's 2023 restriction. Google's note is on its own FAQPage documentation. So enabling this will not change how your page looks in Google.
What it still does: FAQPage and Question remain valid, widely used schema.org types. Google still reads them to understand what your page covers, and AI answer engines read the same data when deciding what to quote. That is the reason to enable it — not search snippets.
Enable it under FAQ settings → Add FAQPage structured data, on one block per page.
The default output is the standard FAQ format, and for most sites that is what you want. If one of those plugins is active, the block shows a Structured data format choice:
FAQPage with a mainEntity list. This is the format validators and AI assistants recognise as an FAQ. FAQPage is a subtype of WebPage, so your SEO plugin's page description and this one will both be present; in practice that is usually fine and is what most FAQ plugins do.No — that is the whole point of this plugin. One block holds all of your questions. Use the "Add question" button inside the block to add more.
Yes. Open the Bulk add panel, paste the text, and it will be parsed into separate questions and answers. You will see how many were found and a preview of the first few before you commit, and you can choose to add them to what is already there or replace it.
The block recognises Q:/A: prefixes, alternating lines, Markdown-style headings, and two columns copied straight out of a spreadsheet. Numbered and bulleted lists are understood too — the 1. or - is not included in the question text. If a line cannot be interpreted, nothing is imported at all and you are told which line caused the problem — an import is never half-applied, so you can fix the line and paste again.
Some layouts it does not model — a Markdown table, for instance, or pairs written one-per-line and joined by a comma or a dash — can still be read the wrong way round without a warning. That is what the preview is for: it shows you the first few pairs as the block understood them, so check those before you commit.
Yes. Copy the two columns — questions in the first, answers in the second — and paste them in. The preview tells you it recognised a spreadsheet and how many pairs it found before anything is added. If a row is missing its question or its answer, or the columns do not line up, it reports the row and imports nothing rather than importing the pairs wrongly.
Yes, using WordPress's own synced patterns. Select the block, create a pattern from it and turn on syncing, then place that pattern on any page that needs it. Editing it in one place updates every page it appears on.
Yes. It uses the browser's own <details> element, so opening and closing works with JavaScript turned off. The only feature that uses JavaScript is the optional "allow only one open at a time" setting, and even then every question still opens and closes normally if that script does not load.
Yes — select the text and use the formatting toolbar that appears, exactly as you would in a normal paragraph. Answers support bold, italic, links, inline code, strikethrough, subscript and superscript. Questions support bold, italic and inline code. Keyboard shortcuts work too: Ctrl+B / Cmd+B for bold, Ctrl+I / Cmd+I for italic, Ctrl+K / Cmd+K for a link.
Not in this version. Answers are rich text — bold, italics, links and lists. Keeping answers as text is what makes pasting a whole FAQ in at once and reordering questions fast, which is the problem this block exists to solve.
No. Google restricted FAQ rich results to government and health sites in 2023, so for almost every site the search benefit people associate with FAQ schema is no longer available. Rather than imply a benefit you would not get, this plugin leaves it out.
It inherits your theme's fonts and colours by default, and supports the standard WordPress colour, typography, spacing and border controls if you want to adjust it.
Yes. Every part of the block has its own class, and these are a stable part of the output — they will not be renamed in a future release without a migration, so it is safe to target them from your theme or from Appearance > Customise > Additional CSS.
.wb-faq__item — one question-and-answer pair (a <details> element).wb-faq__question — the clickable question row (a <summary> element).wb-faq__heading — the question element inside that row (H2–H6, or a <span>, whichever you chose).wb-faq__answer — the answer body.wp-block-ordessa-faq-accordion — the whole block, if you want to scope your rules to it.wb-faq__answer { font-style: italic; opacity: 0.85; }
Or to give questions more weight against the answer text:
.wb-faq__heading { font-weight: 700; }
If you tried that rule on version 0.1.7 or earlier and nothing happened, that was a bug in the plugin, not in your CSS — the block's own styling was overriding it. Fixed in 0.1.8; the rule above now works as written.
An open item also carries the [open] attribute, so .wb-faq__item[open] .wb-faq__question lets you style the question of whichever item is currently expanded.
The complete, unminified source is included in this plugin under src/. The files in build/ are generated from it — nothing is obfuscated, and no third-party libraries are bundled.
The build uses @wordpress/scripts, the official WordPress build tooling, configured in the included package.json. To regenerate build/ from src/:
npm install.npm run build.npm run start builds in watch mode for development. npm run lint:js and npm run lint:css run the WordPress coding-standards linters.
.wb-faq__heading being ignored — including the example in this plugin's own FAQ.<p>; it has been a <span> since 0.1.5.Question items; it now emits the standard FAQPage wrapper with a mainEntity list, which is the shape schema.org validators and AI assistants actually look for. If you enabled the option in 0.1.6, just open and re-save the post to get the corrected output.FAQPage, which is a WebPage subtype — tested against Yoast SEO on a live site, that describes the same URL as both a WebPage and an FAQPage. Rank Math and All in One SEO work the same way. Only use it when no SEO plugin is active; the block warns you when you pick it.<script> is not allowed in post content for Contributors and Authors, so writing it there would have stripped the tag and left the raw data visible on the page. It also keeps it out of your RSS feed.<p> element, but <summary> does not allow paragraphs — only phrasing content, plus an optional heading — so browsers were free to restructure the markup. The option now emits a <span>, which is valid, and is labelled "Plain text" rather than "Paragraph".<p> to <span> automatically the next time the post is opened or saved — no warning, no lost questions or answers, and nothing for you to re-do. Blocks using a heading (the default) were never affected and are untouched.<span> instead, for pages where an extra heading would clutter the document outline.<h7>. The level is now validated against H2–H6 and falls back to H3.<details> and <summary> appearing as escaped text rather than as element names in the plugin description.<details>/<summary> rendering with no required front-end JavaScript.