How to Add Custom CSS to Your WordPress Site
Add CSS to one page or your whole WordPress site without losing changes.
Understanding Custom CSS
CSS means Cascading Style Sheets. It sets how a website looks, including colors, spacing, fonts, and layout. Custom CSS adds new style rules or changes rules from your WordPress theme.
It can help you match a brand, fix a layout issue, or style one block. CSS changes appearance, not the content saved in your posts. That makes it useful for design tweaks without changing your page text.
If you have searched for “what is custom CSS WordPress,” the short answer is site-specific styling. You can use it across your site or limit it to one page. Choose a narrow scope when only one area needs a change.
CSS is separate from features such as custom post types, meta fields, and widgets. Those affect content or site features. CSS can style their appearance, but it does not create them.
Methods to Add Custom CSS
The best place for your CSS depends on your theme and how long you need the changes to last. For quick site-wide edits, try the WordPress Customizer. In many classic themes, open Appearance → Customize → Additional CSS, add a rule, preview it, then publish.
Block themes may not show the Customizer. Check Appearance → Editor for site styles, or use a trusted CSS plugin. A plugin can keep your rules apart from theme files. Check that it is maintained and make a backup before large edits.
For changes that belong with a theme, use a child theme. It holds your edits apart from the parent theme, so updates are less likely to remove them. WordPress explains how child themes work.
So, where is custom CSS in WordPress? It may be in the Customizer, a plugin, or a child theme stylesheet. If you are asking where to put custom CSS in WordPress, pick the option that fits the scope and lifespan of your change.
- Customizer: Quick site-wide edits in many classic themes.
- CSS plugin: A separate place for rules that should outlast theme changes.
- Child theme: Theme-level styles kept apart from parent theme files.
These are common ways for WordPress how to add custom CSS tasks. Avoid editing the parent theme stylesheet directly. A theme update may replace it.
Adding Custom CSS to a WordPress Page
To learn how to add custom CSS to WordPress page content, start in your page builder. Many builders have a page settings panel with a custom CSS area. Menu names and access can vary by builder.
First, find or add a unique CSS class for the block you want to style. A class is a label that lets your rule target that element. In a block editor, look for the block’s advanced settings and its CSS class field.
- Open the page: Edit it with your page builder or block editor.
- Choose the element: Find its class, or add a short, unique class name.
- Add the rule: Put the class and style in the page’s CSS panel.
- Check the result: Preview desktop and mobile views, then save.
For example, a rule for the class .about-intro can set its text color and lower spacing. In CSS, write the class name, then add the style rules inside curly brackets. Keep the class unique so it does not change other sections.
If your builder has no page-level CSS panel, add the rule to site-wide CSS and target a page class. Many themes add a page-specific class to the body element. Use your browser’s inspect tool to find the right class, then test the rule on that page.
This is the core of how to use custom CSS in WordPress: target the right element, make one focused change, and check the result. Save a copy of working rules before you revise them.

Adding Custom CSS to a WordPress Theme
For broad style changes, add CSS through the Customizer or a CSS plugin. For lasting theme edits, use a child theme stylesheet. This is a common answer to how to add custom CSS to WordPress theme files without changing the parent theme.
Create a child theme and add its stylesheet. Then load that stylesheet using the child theme setup. Follow the steps for your theme and test the site after each change. Do not edit the parent theme’s files, since an update can erase your work.
Keep selectors focused. A rule for h2 may change every second-level heading. A rule for .site-footer h2 targets headings in the footer instead. Narrow selectors help prevent unwanted changes across the site.
Add short comments above groups of rules, such as those for the header, buttons, or mobile layout. If a change does not appear, clear site and browser caches. Then check whether another rule takes priority.

Using Custom Fonts in WordPress
First, check your theme’s typography settings. Many themes let you pick a font without adding CSS. A font plugin can also help manage font files and settings.
If you have font files and the right to use them, place them in your child theme. Then add an @font-face rule to its stylesheet. This rule tells the browser where to find the font and what name to use for it.
Once the font is set up, use that name in a font-family rule for the text you want to change. Test the font on desktop and mobile. Also check that your chosen font has the weight and character set your site needs.
If you are looking for how to add custom font in WordPress or how to add custom font to WordPress, start with the theme setting. Use CSS only when you need more control. Keep a fallback font in your rule in case the custom file fails to load.
Best Practices for Custom CSS
Write one small rule at a time, then preview the page. This makes it easier to spot which change caused a problem. Keep a backup of your rules before major edits.
Use clear class names and avoid broad selectors when you can. A general rule may change blocks you did not mean to touch. Add comments to explain why a less obvious rule exists.
Check responsive design by viewing key pages at narrow and wide screen sizes. A margin that looks right on desktop may waste space on a phone. Fix only the layout that needs work.
When styles do not seem to apply, check the selector, spelling, and cache first. Another rule may take priority. If the change affects more pages than expected, narrow the selector or remove the new rule.
- Use a child theme for lasting theme file changes.
- Keep page-only rules tied to a unique page or block class.
- Test changes on mobile and desktop before publishing.
- Back up CSS before making broad edits.
Step-by-step
- 01 Pick where the CSS belongs
Use the Customizer or a plugin for site-wide rules. Choose a child theme for lasting theme file changes.
- 02 Target the right element
Find or add a unique CSS class for the page block. Use a narrow selector to avoid changing other parts of the site.
- 03 Add and test the rule
Enter the CSS in the right panel or stylesheet. Preview desktop and mobile views, then save and clear caches if needed.
Frequently asked questions
- Where do I add custom CSS in WordPress?
- In many classic themes, go to Appearance, Customize, then Additional CSS. You can also use a CSS plugin or a child theme stylesheet.
- How do I add CSS to one WordPress page?
- Use your page builder’s CSS panel or add a unique class to the block. Then target that class in page-level or site-wide CSS.
- Is it safe to edit a WordPress theme stylesheet?
- Avoid editing the parent theme stylesheet because updates may erase your changes. Use a child theme for lasting theme file edits.
- Can I add a custom font to WordPress with CSS?
- Yes. You can use an @font-face rule with font files you have permission to use, then set the font family on the elements you want to style.
- Why is my custom CSS not showing on my site?
- Check the selector and spelling, then clear site and browser caches. Another CSS rule may take priority over your new rule.
Related reading
How to Create a Contact Form in WordPress
Build a useful WordPress contact form, then test it before launch.
How to Install WooCommerce and Set Up Your Store
Install WooCommerce, shape your store, and get products ready to sell.
Create a Portfolio Website with WordPress
Build a polished WordPress portfolio, one clear step at a time.