Contents
On this page

Site Editor Templates - Plugixa Exam

On a block theme (Twenty Twenty-Five, Twenty Twenty-Four, or any theme with a Site Editor), the exam pages are Site Editor templates. Each template is made of small blocks, so you can change a page’s layout the same way you edit your theme’s own templates: move a block, remove one, or add your own text and images around them.

On a classic theme nothing changes: the exam pages keep the plugin’s own layout inside your theme’s header and footer.

What you need

  • WordPress 6.7 or newer.
  • A block theme. Check under Appearance > Themes: a block theme has an Editor item under Appearance.

The plugin turns the templates on by itself when both are true. There is no setting to switch on.

The templates

Open Appearance > Editor > Templates. The plugin’s templates sit in their own group, and every title starts with Exam: so you can find them.

Template The page it draws
Exam: Exam list Every published exam, with the subject filter and page links
Exam: Exam page One exam: its cover, facts, introduction and the start form
Exam: Result One finished attempt
Exam: Certificate check The page that checks a certificate code
Exam: My exams The signed-in learner’s exams
Exam: My results Their results
Exam: My certificates Their certificates

The exam itself, the screen with the questions and the timer, is never a template. It keeps its own full-screen layout so nothing from the theme gets in the way of an exam in progress.

The Site Editor with the Exam: Exam list template open: the theme header, the exam list title, the subject chips and the exam cards, all made of blocks

You can also reach the templates from Exam > Settings > Visitor screens: on a block theme that screen has an Open templates button.

The look follows your style

Each template is built in the look of the style chosen in Settings > Visitor screens (see Visitor Screen Styles). The App style’s exam page has its head card, details card and related exams; the Learner portal style has its banner and fact tiles; the Pro styles, Image first and Compact list, have their own layouts too.

The blocks draw the same markup as the plugin’s own pages, so a template looks like the style’s exam page until you change it.

Change the style later and the templates follow it, as long as you have not saved your own copy of a template. A template you have edited and saved keeps your layout; the blocks inside it still take the new style’s look.

The exam page blocks

Search for exam in the block inserter. These blocks draw one part of the exam page, so they belong in the Exam: Exam page template.

Block What it shows
Exam cover The cover image, or the style’s head card
Exam subject The exam’s subject
Exam description The short summary
Exam introduction The longer introduction (and, in the App style, “What you will practise”)
Exam facts Questions, time limit, pass mark, attempts and more
Exam start form The Start or Resume button, an access code, or why the visitor cannot start
Exam panel A raised box beside the text. Put the start form in it
Exam card A card for the exam’s own text. Put the subject, summary, facts and introduction in it
Exam breadcrumb The way back: All exams, then the exam’s subjects
Related exams Up to three other exams on the same subject
Exam outcome The visitor’s own standing: in progress, passed or not passed
Exam details (style layout) The whole exam page in one block, in the style’s layout

A block that has nothing to show for an exam, such as the introduction of an exam without one, draws nothing on the page. In the editor it shows “Block rendered as empty” so you can still select it.

Patterns

The inserter’s Patterns tab has an Exam category with ready-made layouts:

Pattern Where to use it
Exam list with filters Any page
Learner home Any page: the learner’s exams and certificates, then their latest results
Exam page: start form beside the text The Exam: Exam page template
Exam page: wide cover The Exam: Exam page template
Exam page with related exams The Exam: Exam page template

The three exam page patterns are offered only in that template, because the exam blocks need an exam to show and only the exam page has one.

Undo your changes

To go back to the plugin’s layout, open Appearance > Editor > Templates, find the template, open its Actions menu (the three dots) and choose Reset. Your copy is removed and the plugin’s template takes over again.

Turning the templates off

If you prefer the plugin’s own exam pages on a block theme, add this to a small plugin or your theme’s functions.php:

add_filter( 'plugixa_exam_use_block_templates', '__return_false' );

For developers, the hooks behind the templates are listed in Hooks: plugixa_exam_block_templates (which pages have a template), plugixa_exam_block_template_file (the file a template is read from) and plugixa_exam_block_view_state (what a page reads before it draws).

Troubleshooting

Symptom Usual cause
There are no “Exam:” templates The theme is not a block theme, or WordPress is older than 6.7.
An edit does not show on the site A page cache is serving the old page. Clear it.
The page went back to the plugin’s layout The template was reset, or a filter turns the templates off.
The exam page shows “This exam is not available.” The address names an exam that is not published, or does not exist.
A block shows “Block rendered as empty” in the editor The exam shown in the editor has nothing for that block. The page itself shows nothing there.

What to do next

Quick Links

Share