treehouse : what would you like to learn today?
Web Design Web Development iOS Development

('stylesheet_url') - Need help with variants

  • Hi
    I'm trying to convert a standard web template to be compatible with WordPress.. I realise I must change my stylesheet links within my index.html's (index, index-1, index-2)

    I have 3 lines of stylesheet links that appear in each index page

    ex:
    <link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
    <link rel="stylesheet" href="css/style.css" type="text/css" media="all">
    <link rel="stylesheet" href="css/grid.css" type="text/css" media="all">


    I am changing them to this
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css"  />


    My question is what do I need to change to get the html to identify that there are 3 different kinds of .css file?

    Thanks
  • While everyone has their own preference, I prefer to keep all of my styles in a single stylesheet (though I use SCSS to accomplish that for me and minimize it at the same time).

    You don't need a single stylesheet for WordPress, though. You can simply do something like this:
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/reset.css" type="text/css" media="all">
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="all">
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/grid.css" type="text/css" media="all">

    Remember that your style.css file must live in the root of your theme's folder. In my example above, I've kept the css/ folder for your other two files.
  • Cheers mate