I'm looking for a way to show different input boxes on the Admin Page Edit screen based on which page template is selected.
I've reviewed several approaches to adding custom input boxes:
- http://wpengineer.com/example-how-to-add-meta-boxes-to-edit-area/
- http://labs.dagensskiva.com/plugins/more-fields/
- http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/
Based on the above, I can add meta/input boxes to the Page Edit screen, but they display for every page no matter which template is selected (as expected!).
I would like different input boxes to display on the Page Edit screen based on which template is selected.
For example, I have 2 page templates:
- Default Page Template: requires a "subtitle" in addition to standard fields
- Section Overview Page Template: requires a "subsection title" and "subsection subtitle"
When a user selects Section Overview Page Template on the Page Edit screen, I would like the edit area to display different meta boxes.
Any advice on how to approach this?