How to create a hierarchy of stylesheets for WordPress
-
So, I am currently working on creating a website for myself that is based off bootstrap. However, when I wrote the code I ended up creating multiple styleesheets. It looks something like this as static html
<html lang="en"> <head> <meta charset="utf-8"> <title>Home</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Loading Bootstrap --> <link href="css/bootstrap.css" rel="stylesheet"> <link href="css/bootstrap-responsive.css" rel="stylesheet"> <!-- Loading Flat --> <link href="css/flat.css" rel="stylesheet"> <!-- HTML5 shim, for IE6-8 support of HTML5 elements. --> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <![endif]--> <--Other JavaScript located at end of document for faster loading --> </head>
So because of this, I have a stylesheet, which relies on another stylesheet. In other words, when I try to load the
style.css
I cannot just copy and paste the code together from the stylesheets while maintaining DRY.I’ve looked at the CODEX for documentation for how to use the
enqueue_style
function, but it doesn’t make sense and has just left me confused.Have any suggestions for how to overcome this issue, and properly set up the style sheets for the custom theme?
Any help would be super appreciated
- The topic ‘How to create a hierarchy of stylesheets for WordPress’ is closed to new replies.