Hide certain post types from editors

Here a little function which takes care to hide (In admin) Custom Post Types. function remove_from_admin_menu(){ // Check capability (admin) if( current_user_can( ‘edit_dashboard’ )){ //Do nothing } elseif ( current_user_can( ‘moderate_comments’ ) ) { // editor capability remove_menu_page( ‘edit.php?post_type=cpt01’ ); // add here your cpt name remove_menu_page( ‘edit.php?post_type=cpt02’ ); remove_menu_page( ‘edit.php?post_type=cpt03’ ); // for submenu … Read more

Are styles included in a stylesheet using add_editor_style loaded in the front end?

Below is the full code to include the editor style in a common way. <?php function my_theme_add_editor_styles() { add_editor_style( ‘custom-editor-style.css’ ); } add_action( ‘admin_init’, ‘my_theme_add_editor_styles’ ); ?> When you are adding the custom editor style, you need to use admin_init hook which is triggered only when you are inside the admin panel. So the stylesheet … Read more