
外掛標籤
開發者團隊
原文外掛簡介
WordPress lets you pick a template for each page, but the Pages screen never shows which one. To answer “which pages use the Full Width template?” you have to open every page.
Axle Page Template Usage adds a Template column to the Pages list and a template filter above it.
The column shows the template name. Click it to see every page that uses the same template.
The filter lists every template the theme offers, with the number of pages using each one. A count of 0 means the template is unused.
Click the column heading to sort pages by template.
Missing templates are shown in red. If you switch themes or delete a template file, pages that used it fall back to the default template without any warning. This plugin lists them so you can fix them.
Appearance > Axle Page Template Usage shows every template on one screen: how many pages use it, which templates are unused, and which pages point at templates that no longer exist. Move every page off a template in one click, for example from a missing template to the default one, or from an old template you want to delete.
Check a theme before switching. Pick an installed theme that is not active, and the plugin lists every page and post that would lose its template under it, grouped by template with counts. For each missing template, choose what to use instead (the default template is preselected) and save the plan. When you activate that theme, the pages move by themselves, in batches, and a notice shows the result with an Undo button. Appearance > Themes links to the check from each theme’s details.
Catch templates that went missing. A theme update or a deploy can drop a template that pages still use. WordPress keeps the old value and quietly shows the default layout. The plugin compares the theme’s templates with your pages after a theme update, after a theme switch and once a day, so Git and SFTP deploys are caught too. It adds a notice for people who can act, a Site Health test, and an optional email (off by default) with the template names and page counts. The Missing tab lists each missing template with its pages and the closest template the theme still has: the same file name in another folder, the same template name, or the default. Preview the move, then move the pages. The move goes through the history, so it has an Undo. Nothing is changed by itself.
Preview with another template. Use “Preview with…” in a page row to open the page’s front end with a different template before you change anything. The preview is only for you, nothing is saved, search engines are told to ignore it, and a bar at the bottom has “Use this template” and “Close”. It works for classic and block templates, and only for pages you can edit.
Template history. Every change of a page template is recorded: which page, the old and new template, who made the change, when, and where it came from (the editor, Quick Edit, the Move button, a theme switch, WP-CLI or an ability). The History tab filters by page, source, user, template and date, and a “Template history” link sits in the row actions on the Pages list. Undo a single change while the page still has the template that change set, or undo a whole batch (one Move click or one theme switch) after a confirm step.
Works with:
Classic themes (PHP page templates, including Template Post Type for posts and custom post types).
Block themes (custom templates from theme.json and templates created in the Site Editor).
Any post type that has templates.
Free and open source under the GPL. No pro version, no upsells, no ads in wp-admin, no tracking. And it stays that way.
WP-CLI
wp axle-page-template-usage list (add --status=missing to see only problems)
wp axle-page-template-usage reassign missing default moves every page on a missing template to the default one.
wp axle-page-template-usage missing lists the templates pages use but the theme lacks, with a suggested replacement. It exits with code 1 when any is missing, so a deploy can fail on it. missing-alert on|off turns the email on or off.
wp --user=
wp axle-page-template-usage check-theme
wp axle-page-template-usage set-mapping
wp axle-page-template-usage history lists recorded changes, undo
Privacy
The history stores the ID of the user who changed a template, with the page, the templates and the time. It keeps the latest 10,000 changes and deletes entries older than a year (both can be changed with filters). It is shown only to users who can edit pages, and each of them only sees the changes of the post types they can edit. The plugin adds this to the privacy policy guide, to the personal data exporter, and to the eraser, which keeps each change but removes the link to the person. Uninstalling the plugin deletes the history table and saved plans.
Besides that, nothing is sent anywhere. Free and open source under the GPL, no tracking.
Try it before you install. try.axlewp.com/axle-page-template-usage opens a private WordPress in your browser with this plugin and some demo content.
Part of Axle by AryanX, a family of free plugins for running WordPress sites safely.
