How to add CSS to control elements on the back end of your WordPress site

Code Snippet Related Categories

Reason for needing the Code Snippet

Let’s say you want to style the dashboard, or hide an element that normally shows when editing a Post using display:none;. Even if you can discover the CSS selector using your browser’s inspector and test out your custom styling, you can’t just copy and paste that into the WordPress Customizer.

something

(This post was viewed 92 times) in the last month.)

What the Code Snippet does

You have to use a custom PHP header around the CSS and put it in your fuctions.php file or use

 

askd;lakjsd;kjasdf

Here's the Code Snippet

add_action( 'wp_head', function () { ?>
<style>

/* write your CSS code here */

</style>
<?php } );

Limit search for phrases by using " " around the phrase

Subscribe to Code Snippet updates

You will get an email the morning after we post a new Code Snippet

Something went wrong. Please check your entries and try again.

Other Recent Code Snippets

Post Format: Aside

Posted in

“I never tried to prove nothing, just wanted to give a good show. My life has always been my music, it’s always come first, but the music ain’t worth nothing if you can’t lay it on the public. The main thing is to live for that audience, ’cause what you’re […]

Read More

Post Format: Status

Posted in

WordPress, how do I love thee? Let me count the ways (in 140 characters or less).

Read More

Post Format: Link

Posted in

The WordPress Theme Review Team Website

Read More

Post Format: Quote

Posted in

Only one thing is impossible for God: To find any sense in any copyright law on the planet. Mark Twain

Read More

Post Format: Chat

Posted in

Abbott: Strange as it may seem, they give ball players nowadays very peculiar names. Costello: Funny names? Abbott: Nicknames, nicknames. Now, on the St. Louis team we have Who’s on first, What’s on second, I Don’t Know is on third– Costello: That’s what I want to find out. I want […]

Read More

Pieter Hartsook

WordPress website coaching, design, implementation, support, and training. Background in Marketing Research and Communications. See my profile at: https://www.linkedin.com/in/hartsook/

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

Skip to content