Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: What is the correct way to alter the admin-bar.css


r-a-y
Keymaster

@r-a-y

Try this…

Paste the following in your “bp-custom.php” file (‘wp-content/plugins/bp-custom.php’). If you don’t have one, make one!

function my_admin_bar_css() {
echo '<link href="LINK TO STYLESHEET" rel="stylesheet" type="text/css" media="screen,projection" />';
}

remove_action('wp_head', 'bp_core_admin_bar_css', 1);
add_action('wp_head', 'my_admin_bar_css', 1);

Assuming that your admin bar stylesheet is in your member theme’s directory, you could probably use “<?php bloginfo(‘template_url’); ?>/css/your_admin_bar.css” to determine the theme’s path (I say probably  b/c I’m not sure! hehe).

Might want to play around with that… in theory, it should work… *untested*.

[EDIT]

Okay I’ve tested this… and it doesn’t quite work!

The custom CSS gets loaded, but I can’t seem to remove bp_core_admin_bar_css.

Time for a mod to jump in!

Skip to toolbar