Admin bar default color scheme for nonregistered/nonlogged users

Follow these steps: Use the following code in your functions.php or your site specific plugin: function set_default_admin_color($user_id) { $args = array( ‘ID’ => $user_id, ‘admin_color’ => ‘coffee’ ); wp_update_user( $args ); } add_action(‘user_register’, ‘set_default_admin_color’); Now, add these lines to force “Coffee” color scheme to be displayed in the admin bar: if ( !current_user_can(‘manage_options’) ) remove_action( … Read more

Remove dashicons.min.css conditionally

Try this. add_action( ‘wp_enqueue_scripts’, ‘go_dequeue_dashicons’ ); function go_dequeue_dashicons() { if ( ! is_user_logged_in() && !is_page( array( 9, 10 ) ) && !in_category( array( 29, 2 ) ) ) { wp_deregister_style( ‘dashicons’ ); } } I basically just combined the IF statements and changed || to &&.

all of a sudden my child theme style.css is being ignored? Its been working fine for months?

Required (child) Theme Files Check if your child theme has a style.css functions.php screenshot.png (optional, but will help you differentiate) Recommended basic functions.php for a child theme <?php /** * Example child theme Remzi Cavdar * * @link https://developer.wordpress.org/themes/advanced-topics/child-themes/ * * */ function use_parent_theme_stylesheet() { // Use the parent theme’s stylesheet return get_template_directory_uri() . ‘/style.css’; … Read more

Style not being applied to newly installed themes

It seems that the stylesheet are not linked properly. If you are using Google Chrome, right-click and select Inspect. A new window with all kinds of code will show up. Find and expand the <head> element. There, you will find a long list of elements. These are the stylesheets enqueued from a wide variety of … Read more

Navigation menu disappears when I hover the mouse [closed]

See in this screenshot http://prntscr.com/mldnem “li tag” is padding with red border so it is max height to consider li tag to hover sub menu if mouse cursor is go to below the red border then sub-menu is automatically disappears. so you can either reduce the font size of menu with padding or remove 2 … Read more