Using Stylus to Change the WordPress Admin Bar

A member of the WordPress Louisville meetup that I co-organize sent me an email today. They recently found where you can change your admin color scheme in the WordPress user settings. But a caveat with that setting is that when logged into the site but viewing the front end with the admin bar, that bar does not receive the dashboard styles.

When you’re working in client sites or have several instances of a site, it can be useful for that bar to somehow signal that environment appropriately. The typical dashboard settings obviously fail to do that.

If you don’t mind having a plugin running for just this purpose – like if it’s your own site and you can damn well do what you want – then I recommend this plugin from the ServerPress folks:

Admin Color Bar

It provides a simple settings page that lets you change the color of the admin bar and also add a message as well (e.g. DEV or STAGING or PROD).

But it doesn’t offer anything regarding user-specific settings, so what you choose will take effect for all users. And it’s yet another plugin in the list that you may get email about, asking why you installed it. And maybe your client doesn’t like that shade of pink you chose. And… you may find this just to be the wrong choice on a site that isn’t totally yours.

In those circumstances I turn to a browser extension that’s useful all over the web: Stylus. I was a big Stylish user until its big privacy controversy and Stylus was the obvious alternative. I hear Stylish is available again, but why bother switching?

In brief, this add-on lets you save CSS styles that will run only where you can decide, and the styles will be specific only to your browser where you save the styles.

Here’s the step-by-step for our Admin Bar change

  1. Install the add-on (Firefox, Chrome)
  2. Visit your site where you need the custom styles
  3. Click on the Stylus button in the browser and click the link where it says “Write style for:” . This will open up a CSS editor where the styles will only run on the domain you’re currently on.
  4. Add your CSS (see the CSS below)
  5. If you want to, add more refined rules (like maybe you only want to run this on the homepage, not any page on the domain? I dunno, it’s your customization.)
  6. Save.

Look at your page again and notice your custom styles are in place. Visit that page in another browser or with the add-on not running, your custom styles are missing. Cool, huh

The admin bar itself has the id wpadminbar so the following CSS will change its background color:

#wpadminbar {
    background-color: #FFB6C1;

I don’t care you don’t like my shade of “Production Pink.”

But of course it doesn’t have to stop there, you can add any CSS you want for effect you want. I find the background for my needs, but the point is that this solution is specific only to your browser, in places where you tell it to be. So no worries what anyone else might think because anyone else won’t see it.

Once you’ve made this first change to your browser, its hard to go back. Custom CSS rules can make some unbearable websites usable again. But little hacks like these to make your life easier are the first step!

What You Do and How You Do It

When examining my career, I describe most of my efforts both ways. It’s why I’ve pushed so hard to improve on a craft I believe in. Until today I don’t think I’ve ever sold myself that way.

What I do: WordPress developer, front-end developer, full-stack developer, PHP developer.

How I do it: on time, just-in-time, humbly, transparently, remotely, honestly.

I used to think the “what” could make me rare and valuable. But more and more the feedback I get says it’s the “how.”

The Right Work with a Bad Result

The poker player has bet well for a few rounds and thinks they have the best hand, all the way up to the river. Now she feels like the one opponent remaining may have been holding onto a straight draw they way overplayed… until it just hit. After a minute of deliberation, she folds the hand. It hurts to lose a big pot she took the time to build, but it was the right call.

The lesson learned isn’t that she shouldn’t have bet all those times. It’s that bad results can still happen, even when you do the right work. Do the right work again. Try to keep doing it better. 

That sales call where you followed up as promised, but the client you thought you had rapport with had nothing but a snarl for your latest proposal. That short story you wrote with the perfect twist ending, that had nothing but rejections from your favorite magazines. That conversation you’ve been meaning to have with a parent for so long, but doesn’t go as well as you’d hoped. You made the right call to make the effort, and the bad result was out of your control.

Make more calls, and keep trying to make them better. Learn the work, not the result.

Work They Would Miss

Next week is my last one full-time at ye olde web agency. It has me a bit emotional because the is the first job I’ve left where I feel like I’ve truly left a mark. I’m proud of my earlier jobs too but in all of them I think I was a cog in a machine. At Makespace I always tried to be me, doing the best I could to help others.

Multiple people have pulled me aside or messaged me privately to say it won’t be the same without me, or they’re not sure how well some such thing will happen without me or even a true plea to stay. For the first time I think I’ve succeeded in doing work that is indispensable. That’s a goal I’ve been striving to reach for at least 10 years.

But that’s also why I have to leave. If I’m ready to do work that’s worthwhile, that people would miss if it was gone, that makes my tiny square of this world ever so slightly better, I have the responsibility to provide it as best as I can.

To accept that responsibility I’m also ready to accept the risks that come with being a craftsmen. It’s scary to be sure, but it’s never felt more right.

The Year of Refactoring

At the beginning of 2018, I recommended an episode of Cortex that was all about discussing “yearly themes.” I’ve genuinely been working on this idea in my head all year. The closest I ever really came to making a theme for this year was “the year of flexibility.” I wanted to become more open and experimental in how I worked, how I planned, how I parented, and also literally become more flexible physically.

None of those things really worked out well, though they’re all still on my mind. Such failures have driven me to figuring out exactly what I do want out of the next year or so: a refactor.

If my life had a changelog, I’d say we’re on Alex version 4. V4 is considered by all to be a great leap from previous versions, but it has come with a lot breaking changes. The health API (arguably the most important feature) is inconsistent at best and the source code is very hard to work with when bugs are identified.

Metaphors aside, I’ve identified that coding for a living is exactly what I should be doing but this state of sacrificing everything else so that I can keep chasing that identity has to stop. I need to cleanup my entire approach to living, not just programming. And some big commitments need to be made to really let that happen. It’s going to be a grind, but at this point there’s no avoiding it.

Some not-fun grinds are ahead, but what you can expect a year from now is I’ll still be coding: but with a different aim. I’ll still be parenting: but happier. I’ll still be a big dude: but less big.

No One Ever Tells You

No one ever tells you your well seems dry and you should do what it takes to fill it back up.

No one ever tells you to work on your framework technology instead of their project.

No one ever tells you to stop the unpaid overtime you’ve worked for them.

No one ever tells you that leaping can be safer than staying put.

Just because no one else says it doesn’t mean it’s not the right choice. Have the courage to say the thing no one ever says. Say it to yourself and to anyone you care about. Your words matter.

Another Day, Another Deadlift


Second trip to the new gym. Deadlifts and overhead presses plus walks there and back.

Made some decent choices about food – the only irresponsible thing being a trip to Dairy Del in the evening.

Grocery shop, dishes, laundry folding, straightening up the house all as a matter of course.

Tons of time with Grace today since it’s the weekend and Ber had an event to attend. She’s getting a lot better at playing with toys of her own accord. We haven’t even be trying to potty train and she apparently figured out how to do that on her own to our pleasant surprise.


The last episode of Cortex, Minimum Viable, was so freaking good. Made even better today when listening to ATP. I audibly snorted at the reference to fanny packs.


Been re-reading a bunch of classic MMM articles recently. Also a lot of re-visiting Apprenticeship Patterns as I think I’m at somewhat of a milestone in position at Makespace and needed to remind myself what road I’m on. I finally got started on Walter Isaacson’s The Innovators and I’m not far into it but really did enjoy the section on Ada Lovelace.