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

Bring Font Awesome icons inside menu A tags

What I have tried in the past is to place the Font-awesome code with class name in the label field and remove any current labels. Instead of using the optional class field, this worked for me in the past. I have not tried it lately, so I am not sure if this still works. For … 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