Skip to content

Instantly share code, notes, and snippets.

@danmaby
Created June 9, 2018 08:21
Show Gist options
  • Save danmaby/0cda0df9b8b474939ccb3ecf77d33112 to your computer and use it in GitHub Desktop.
Save danmaby/0cda0df9b8b474939ccb3ecf77d33112 to your computer and use it in GitHub Desktop.
default editor label for my_custom_post_type
<?php
// default editor label for my_custom_post_type
add_action('admin_footer', 'add_title_to_editor');
function add_title_to_editor() {
global $post;
if (get_post_type($post) == 'my_custom_post_type') : ?>
<script> jQuery('<h3>Optional Additional Information</h3>').insertBefore('#postdivrich'); </script>
<? endif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment