See All of Your WordPress Page Template Info

For me, one of the minor annoyances with working with WordPress page templates is that you often have to look at a specific page’s edit screen to see what page template it has been assigned.

That is to say that there’s no way to get a global view of the pages and their associated templates.

In order to make it a bit easier, I wrote a quick plugin that makes it easy to see which page template is assigned to a given page on the All Pages screen in the WordPress dashboard.

WordPress Page Template Info

For those who are interested, you can view the source and download a copy of the plugin on GitHub.

The Page Template Info Plugin on GitHub

The Page Template Info Plugin on GitHub

Just as the plugin description reads:

This plugin displays the name of the template associated with each page on the ‘All Pages’ page.

The plugin was developed against 3.8-beta-1 of WordPress, and I’m planning to keep it updated with the most recent version of WordPress; however, there are also a couple of other things that I plan to do with the plugin, as well.

The Plugin in Action

Page Template Info

Page Template Info

Simple enough, isn’t it?

On the All Posts page, it renders the name of the template being used below the title of the page. This makes it much easier than having to drill down to an individual page to check the Page Template meta box to see which template has been used.

Personally, this has been something that’s been useful for me when working on larger sites than the example of, you know, the two pages listed above.

Future Development

As the plugin denotes, this is only 0.1.0. Over time, I’m hoping to use this particular plugin to test out some object-oriented programming techniques as they relate to WordPress plugin development.

Specifically, I’m interested in doing a better job of applying the SOLID principles and creating a class, say, specifically designed to register actions. I’m also interested in doing a better job of dependency injection, PHP documentation, and so on.

I also need to actually evaluate the code against the new JavaScript Coding Standards, minify it, and make sure everything is up to par.

Regardless, the plugin’s available, and will be under development whenever I have a few minutes to spare on experimenting and improving it.

8 Comments

Would the information not be better in a new column so you could sort by the template?

Nice and simple!

Another suggestion – perhaps the Template Name is a dropdown list of the available templates? Otherwise, just clicking the Quick Edit link reveals the template anyway.

I think Adam’s described the “Codepress Admin Columns” plugin – but that doesn’t allow sorting unless you upgrade to the Paid version. Plus, it’s not as niche as your plugin.

(Small nit: You mention, “On the All Posts page, it renders…” – it’s actually the All Pages page.)

Thanks.

Hi! I was wondering why you haven’t uploaded this to the repo yet, seems like it’d be useful for folks! Are you wanting to clean it up first before putting in in the repo?

Leave a Reply

Name and email address are required. Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>