Free on GitHub

Page Template Usage

See which template every page uses, and fix pages on a missing template.

Use it when

  • you switch or update a theme.
The Template column and filter on the Pages screen
The Template column and filter on the Pages screen
A page whose template no longer exists
A page whose template no longer exists
Appearance > Axle Page Template Usage
Appearance > Axle Page Template Usage

What it does

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.

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 > 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. 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 page-template-usage list (add --status=missing to see only problems)
  • wp page-template-usage reassign missing default moves every page on a missing template to the default one.

No settings and nothing stored in the database. Deactivate it and it is gone.

Install

  1. Download axle-page-template-usage.zip (v3.1.1).
  2. In wp-admin, go to Plugins > Add New Plugin > Upload Plugin and choose the zip.
  3. Click Install Now, then Activate.

Or with WP-CLI:

$ wp plugin install https://github.com/aryanjasala/axle-page-template-usage/releases/download/v3.1.1/axle-page-template-usage.zip --activate

To try it first, try.axlewp.com/axle-page-template-usage opens a private WordPress in your browser with this release and some demo content.

Compatibility

Checked by the end-to-end tests on every change. Unit tests run on PHP 7.4 to 8.4.
WordPressPHPStatus
WordPress 7.1PHP 8.3Tested
WordPress 6.9PHP 8.3Tested
WordPress 6.6PHP 7.4Tested

Questions

Why does a page show "Missing template"?

The page was saved with a template that the active theme does not provide any more. This usually happens after a theme switch, or after a template file is renamed or deleted. WordPress shows the default template for that page. Pick a new template in the editor, or in Quick Edit, to clear it.

Does it slow down the Pages screen?

No. It runs one grouped count query when the screen loads and caches the result for a minute.

Does it work on posts?

Yes, if your theme offers templates for posts. The column only appears on post types that have templates, or that have posts pointing at a template.

Changelog

3.1.1

  • Fix: only show the templates of post types the user can edit

3.1.0

  • New: check a theme before switching and record template history

3.0.0

  • Changed (breaking change): rename to Axle Page Template Usage for WordPress.org

Every release, with notes: GitHub releases.