Add a Template column to Pages, showing which page template each page uses.
add_filter( 'manage_pages_columns', function ( array $columns ): array {
$columns['nahnu_template'] = 'Template';
return $columns;
} );
add_action( 'manage_pages_custom_column', function ( string $column, int $post_id ): void {
if ( 'nahnu_template' !== $column ) {
return;
}
$slug = get_page_template_slug( $post_id );
$templates = array_flip( wp_get_theme()->get_page_templates() );
$name = $slug ? ( array_search( $slug, $templates, true ) ?: $slug ) : 'Default';
echo esc_html( $name );
}, 10, 2 );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Finding every page that uses a particular template, before you change or remove it, normally means opening pages one by one. This snippet shows the template right in the list.
get_page_template_slug() returns the template file set for a page, or an empty string for the default. The snippet looks up the template’s human-readable name from the active theme so you see “Full width” rather than page-templates/full-width.php.
Open Pages → All Pages. Each row should show its template name, or “Default”.