Change the color of the Password Protected Post titles

To change the color of password protected post titles in the admin In your theme or child theme, enqueue a stylesheet to load in the admin, then add some simple CSS to change the color using the class that is given to password protected posts. In your theme’s functions.php… function wpse_admin_styles(){ wp_enqueue_style( ‘admin_css’, get_stylesheet_directory_uri() . … Read more

Icons are missing from Visual Editor

After a few more days of frustrating testing, I managed to track the issue down to the External Links Rewrite option in Siteground’s Site Tools, under SSL options. When HTTP Enforce is enabled with the optional External Links Rewrite option (being able to see these changes virtually immediately in the browser requires a Force Refresh, … Read more

Adding JavaScript file in Admin Panel

Yes, your code is good. And that my_custom_script is a unique identifier for the script you’re enqueueing. You can find the default script handlers/identifiers here — e.g. jquery for the jQuery library that ships with WordPress. There you can also find more details about the wp_enqueue_script() function, e.g. where should you use the function, the … Read more

Remove WP Admin Menu Items by User Role

function shapeSpace_remove_toolbar_menu() { global $wp_admin_bar; // remove menu for editor and author if( current_user_can( ‘editor’ ) || current_user_can( ‘author’ ) ){ $wp_admin_bar->remove_menu(‘site-name’); } } add_action(‘wp_before_admin_bar_render’, ‘shapeSpace_remove_toolbar_menu’, 999); All Roles: current_user_can( ‘administrator’ ) current_user_can( ‘editor’ ) current_user_can( ‘author’ ) current_user_can( ‘contributor’ ) current_user_can( ‘subscriber’ )