Add custom fields to a page template, admin side
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_action(‘add_meta_boxes’, ‘foo_page_template_meta_box’); function foo_page_template_meta_box(){ add_meta_box( ‘foo_page_template_options’, __(‘Foo Page Template Options’), ‘foo_page_template_options’, ‘page’ ); } function foo_page_template_options(){ //Your custom field form goes here } … Read more