Created
April 23, 2014 13:26
-
-
Save ivandoric/11215147 to your computer and use it in GitHub Desktop.
wordpress: Hide editor but leave "Add Media" button on post type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hide_editor_leave_media_button() { | |
global $current_screen; | |
if( $current_screen->post_type == 'ENTER_POST_TYPE_HERE' ) { | |
$css = '<style type="text/css">'; | |
$css .= '#wp-content-editor-container, #post-status-info, .wp-switch-editor { display: none; }'; | |
$css .= '</style>'; | |
echo $css; | |
} | |
} | |
add_action('admin_footer', 'hide_editor_leave_media_button'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment