How do I add custom CSS and Javascript to my WordPress site?

It is not possible to add custom JavaScript to a WordPress site. As for CSS, you can add inline styles to the HTML.

To add custom CSS to a page, you can go to Dashboard > Appearance > Additional CSS. Any custom CSS added here will affect styling across your whole site:

advanced options for page

You can also add additional CSS classes to individual blocks. When you are editing a block, expand the Advanced settings dropdown in the block settings panel. Enter the desired CSS classes in the text box labeled “Additional CSS class(es).”

 

Details

Article ID: 5401
Created
Wed 5/5/21 10:35 AM
Modified
Mon 7/17/23 3:13 PM