4WP FAQ

Description

4WP FAQ is a smart wrapper around WordPress core Accordion blocks. It adds FAQPage JSON-LD, an optional aggregated FAQ registry, and usage context while keeping your front-end design intact.

A plugin by 4wp.dev. 4WP is our project brand; this plugin is not affiliated with, endorsed, or sponsored by WordPress.

Source code and releases: github.com/4wpdev/4wp-faq

Blocks

  • 4WP FAQ (forwp/faq) — wrap Accordion / Accordion Item for FAQPage JSON-LD and registry scan
  • 4WP FAQ List (forwp/faq-list) — registry glossary: grouped or flat, include/exclude categories
  • 4WP FAQ Categories (forwp/faq-categories) — category nav that filters the List (Interactivity API)
  • 4WP FAQ Count (forwp/faq-count) — live count for All / current category / search ([forwp_faq_count])
  • 4WP FAQ Card (forwp/faq-card) — inner card for the List (not shown in the inserter)

Development

JavaScript and CSS are built with @wordpress/scripts. Human-readable source (src/, webpack.config.js, package.json) is in the public GitHub repository above — not in the distributed plugin ZIP.

From a clone of the repository:

  1. cd into the plugin directory
  2. npm install
  3. npm run build — compiles block, admin, and setup apps into build/

Key features

  • Wrap Accordion / Accordion Item (legacy Details supported)
  • FAQPage JSON-LD — site-wide toggle plus per-block override; hub pages output the questions actually shown
  • Optional FAQ registry CPT with content scan and usage stats (“Used in” sources)
  • FAQ categories — create in admin, pick per block, or auto-create on scan from the page
  • FSE hub blocks — List, Categories, Count, and Card for registry-powered FAQ archives
  • Preview count per category on the All view + optional pretty category URLs
  • Drag-and-drop category order on the taxonomy screen
  • Polylang — registry categories respect the language of the page where the FAQ block lives
  • Setup wizard for registry post type and taxonomy slugs
  • Convert to FAQ toolbar action on Accordion blocks
  • Default Accordion template when inserting the FAQ block; Add FAQ item in the editor

How it works

  1. Build FAQs with core Accordion blocks (or convert existing Accordion).
  2. Click Convert to FAQ to wrap content in forwp/faq.
  3. Enable JSON-LD in FAQ Settings (recommended for SEO) or per block.
  4. Optionally complete setup to aggregate questions into a registry list, then place List + Categories on a hub page.

JSON-LD on the front end does not require the registry. The registry is for browsing, reuse tracking, and hub layouts.

Blocks

This plugin provides 5 blocks.

  • 4WP FAQ Categories FAQ category navigation: vertical or horizontal. Filters 4WP FAQ List via the Interactivity API.
  • 4WP FAQ List Registry FAQ list: grouped by category or a single list, with include/exclude.
  • 4WP FAQ Count Live count of FAQ questions on this page: all, the current category URL, or the current search.
  • 4WP FAQ FAQ wrapper for accordion items.
  • 4WP FAQ Card Single FAQ registry card: accordion or heading plus description, optional source links.

Installation

  1. Upload the plugin to /wp-content/plugins/4wp-faq/ or install from the Plugins screen.
  2. Activate 4WP FAQ.
  3. Add or convert Accordion blocks, then open FAQ Settings for JSON-LD and registry options.
  4. After registry setup + rescan, add 4WP FAQ List and 4WP FAQ Categories on a page or template.

FAQ

Does this replace the Accordion block?

No. 4WP FAQ is a thin wrapper. Your theme and block styles stay the same.

Is JSON-LD enabled by default?

No. Turn it on under FAQ Settings (site-wide) or enable it for individual blocks in the block sidebar.

Why does wordpress.org show only one block?

Older packages registered List / Categories / Count from PHP only. From 2.2.0 each public block declares editorScript (and styles where applicable) in its block.json so the directory can discover them.

What happens if I reset setup?

You can change registry slugs in the wizard again, but FAQ categories are removed. Existing registry posts remain on the previous post type until you complete setup and run a new scan.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“4WP FAQ” is open source software. The following people have contributed to this plugin.

Contributors

Translate “4WP FAQ” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.2.0

  • Listing: declare editorScript / style in block.json for List, Categories, Count, and Card so wordpress.org discovers hub blocks (not only the FAQ wrapper).
  • Contributors: add anatolikkk (Anatoliy Dovgun) alongside 4wpdev.
  • Add 4WP FAQ Count block and [forwp_faq_count] shortcode.
  • Hub: per-category preview on All view, “View all” links, SEO/pretty category URLs, category SEO title/description, drag-and-drop term order.
  • Card: optional “Used in” source links from registry usage meta.
  • Admin: preview-per-category and SEO URL settings; clearer JSON-LD help for hub pages.
  • Stabilize readme Stable tag / plugin header / package.json on 2.2.0.

2.1.0

  • Add FSE registry hub blocks: 4WP FAQ List, 4WP FAQ Card, 4WP FAQ Categories.
  • Shared include/exclude filters between List and Categories (Interactivity API).
  • Registry content helpers and front-end FAQ view script.

2.0.3

  • Fix: FAQPage JSON-LD uses <summary> text as Question.name for core Details blocks (no longer duplicates the answer).
  • Fix: FAQPage JSON-LD outputs in <head> for reliable detection by validators and crawlers.
  • Add: @id and url on FAQPage schema.

2.0.2

  • Maintenance release.

2.0.1

  • Fix: incomplete plugin uploads no longer white-screen the site — missing PHP files show an admin error and the plugin stops loading safely.
  • Deploy: ensure includes/class-category-resolver.php and other required files are present when updating from 2.0.0.

2.0.0

  • Registry categories: none, existing, or create new per FAQ block (applied on scan).
  • Categories can be managed in admin or derived from the pages where FAQ blocks are placed.
  • Polylang: language-aware FAQ categories during registry scan.
  • Block editor: default Accordion with one item on insert; Add FAQ item button.
  • WPML support planned for a future release.

1.0.0

  • Initial release: forwp/faq wrapper, setup wizard, registry scan, JSON-LD, admin settings UI.