I'm adding a page template to the theme I'm currently using. Is there any way to make the admin editor to show some input text fields or other options for the template?
For example, I'd need two textareas.
|
I'm adding a page template to the theme I'm currently using. Is there any way to make the admin editor to show some input text fields or other options for the template? For example, I'd need two textareas. |
|||
|
|
|
You can do this via JavaScript rather easily. Here are the steps you need to take. I've created a sample (untested) script below as a proof-of-concept for you. Register your meta box
Add JavaScript and CSS to admin_head for post.php and post-new.php
The main premise of this approach is that you load the meta box on all 'page' edit screens, but only show it when the page template select value matches your page template file name. Hope this helps! |
||||
|
|