Hide Front-End Admin Bar Including 32 px Spacing
You can set the display status with show_admin_bar function <?php show_admin_bar( false ); ?>
You can set the display status with show_admin_bar function <?php show_admin_bar( false ); ?>
As @N00b said, if a selector matches between bootstrap and wordpress, and is more specific, then it will overwrite and you’ll see the changes.
The Editor itself doesn’t have much in the way of visible styling; it’s more to ensure consistency across Editor components themselves, like buttons and info panels. You are meant to apply styles wherever they’re needed. Usually, most of your CSS should go in a file that gets enqueued on both ends – the front end … Read more
Before: add_action(‘admin_head’, function(){ ?> <style type=”text/css”> #wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before { content: “LOL”; top: 2px; } </style> <?php }); After: You may also use admin_enqueue_scripts action hook: function my_enqueue($hook) { wp_enqueue_style( ‘my_custom_script’, plugin_dir_url( __FILE__ ) . ‘my-style.css’ ); } add_action( ‘admin_enqueue_scripts’, ‘my_enqueue’ ); See: https://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts …didn’t even have to hack a core file. That … Read more
The $hook_suffix global (copy of which you are getting passed to the hook) doesn’t go into such detail. However there is plenty more of context to check. In modern WP versions bulk of it is via get_current_screen() which returns WP_Screen object with plenty of stuff (in this case you would want to check id and … Read more
I haven’t tested this but theoretically you could do something like this (Using the Codex as an Example): function load_custom_wp_admin_style() { $pageArr = array(1, 2, 3); if(isset($_GET[‘post’]) && in_array($_GET[‘post’], $pageArr)){ wp_register_style( ‘custom_wp_admin_css’, get_template_directory_uri() . ‘/admin-style.css’, false, ‘1.0.0’ ); wp_enqueue_style( ‘custom_wp_admin_css’ ); } } add_action( ‘admin_enqueue_scripts’, ‘load_custom_wp_admin_style’ ); We get the current screen and set the … Read more
You can do this with remove_menu_page. Add the appropriate menu slug in your functions.php of your theme or your plugin. <?php remove_menu_page( $menu_slug ) ?> Note that users can still access these menus using a direct link. If you intend to block a user from accessing a menu, you will have to set up a … Read more
That’s pretty fine and it’s the proper way to add CSS to login page. But you can also change login page CSS by below code- function the_dramatist_custom_login_css() { echo ‘<style type=”text/css”> //Write your css here </style>’; } add_action(‘login_head’, ‘the_dramatist_custom_login_css’); This actually prints CSS code inline in the login page. And for admin CSS your way … Read more
Not complicated, but a little tricky to get timing right. Something like this should work, but you might need to experiment with priority to get the link to specific position on the bar: add_action( ‘admin_bar_menu’, function ( $wp_admin_bar ) { if ( ! is_admin() ) { return; } /** @var WP_Admin_Bar $wp_admin_bar */ $wp_admin_bar->remove_node( ‘view-site’ … Read more
You wouldn’t be able to add a FontAwesome icon by passing it directly to the ed.addButton(); method unfortunately. You can try a workaround however. If you leave the image : url+’/youtube.png’ parameter out of the method then it will automatically create an empty <span> with the class of mceIcon & another class of mce_[plugin_name]. You … Read more