Load a few lines of your own CSS on every admin page, to hide clutter or match your brand.
add_action( 'admin_enqueue_scripts', function (): void {
$css = '
/* Example: hide the "Screen Options" tab on the dashboard. */
.index-php #screen-options-link-wrap { display: none; }
/* Example: brand-coloured primary buttons. */
.wp-core-ui .button-primary { background: #6F58CA; border-color: #6F58CA; }
.wp-core-ui .button-primary:hover { background: #5B45B8; border-color: #5B45B8; }
';
wp_add_inline_style( 'common', $css );
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Sometimes the fastest fix in wp-admin is a little CSS: hiding a confusing setting, tidying a plugin’s screen or adding your brand colour. This snippet adds your CSS to every admin page the proper way.
On admin_enqueue_scripts, wp_add_inline_style() attaches your CSS to common, the stylesheet WordPress loads on every admin page. It’s printed right after that file, so your rules win without needing !important.
Body classes such as .index-php (dashboard) or .post-type-product let you target a single screen.
Reload any admin page. Primary buttons should use your brand colour.