Repository root corresponds to the wp-content directory.
Implementation is split into:
- a custom plugin for content functionality
- a child theme for the presentation layer
- a custom Gutenberg block plugin for FAQ
plugins/library-core
content plugin responsible for:
- Books custom post type
- Genre taxonomy
- admin-ajax JSON handler for "other books"
- genre archive query adjustments
themes/twentytwentyfive-child
Child theme responsible for the presentation layer:
- custom templates
- frontend assets (CSS / JS)
plugins/faq-accordion-block
Custom Gutenberg block plugin responsible for:
- FAQ Accordion parent block
- FAQ Item inner block (question/answer)
- frontend accordion behavior
- Activate
library-coreplugin. - Activate
faq-accordion-blockplugin. - Build FAQ block assets:
cd plugins/faq-accordion-blocknpm installnpm run build
- In WP Admin, create a few
Booksposts and assignGenreterms. - Open a single book page and verify:
- title, featured image, genre, publication date
- "other books" list loads asynchronously
- In browser devtools, verify the request goes to
admin-ajax.phpand returns JSON. - Open a Genre archive page and verify:
- only books from the selected genre are listed
- 5 items per page
- pagination/next-previous works
- In Gutenberg editor, add
FAQ Accordion. - Edit heading and add multiple
FAQ Itemblocks. - Verify each question toggles its answer on frontend.
- Verify numeric order appears before each question.
- Verify layout is usable on desktop and mobile widths.