WordPress FAQ

How to Add Custom CSS to WordPress Themes

Use browser developer tools to identify correct CSS selectors for specific styling rather than relying on the !important override rule. medium confidence based on 8 community reports

Use browser developer tools to identify correct CSS selectors for specific styling rather than relying on the !important override rule.

Based on 8 community reports.

Linked sources: 9.

Known Issues

Community Q&A

How do I add custom CSS to my WordPress site?

You can add custom CSS via the WordPress Customizer under ‘Additional CSS’ or by using a child theme’s style.css file.

Should I use !important in my custom CSS?

It is generally recommended to avoid !important and instead use more specific CSS selectors to override existing styles.

How can I find the right CSS selector to change?

Right-click the element on your website and select ‘Inspect’ in your browser to view the current CSS classes and styles applied.

Reddit Sources