Tag Archives: WordPress

WordPress | Add a style sheet to your theme quick and dirty

So you might need to add an additional css style sheet to your wordpress theme. If you are not developing a theme for the public and it is just you that is going to be working on the site and you just want to get it done quick and dirty then you can just navigate to your theme folder and open up your header.php file in your code editor and past in the link element that references your new css file.

Your final code will look something like this: –

<head>


<!-- all your header code -->


<link href="http://my_wordpress_site.com/wp-content/themes/my_wordpress_theme/my_style_sheet.css" media="all" type="text/css" />
</head>

Just add the link element just above the closing head tag and put your new css file in your theme directory. That would work but like I said it’s quick it’s dirty and I wouldn’t recommend it for anything other then a personal site.

I will be adding better and more complex ways to get this task done in future posts but if you really need to know now you can check out the enqueue style function in the wordpress codex