Support » Themes and Templates » @import Not Working on Custom Theme

  • Resolved tristangemus

    (@tristangemus)


    Hello,

    I am working through a tutorial about converting a PSD to HTML. I have created the header and the theme is working. But, the styles are not. I have followed everything to a tee.

    When I check the styles in view source, it links to my style.css in the root directory. That stylesheet contains:

    —–
    /****
    theme info etc
    ****/

    @import url(‘css/styles.css’);

    I’ve tried different variations of paths, linked to it using http:// … etc.

    What did work was pasting my stylesheet into style.css form css/styles.css and it applied my styles. Anyone think they know the solution? I’ve tracked the problem to the @import section.

    Am I missing a framework? Something is up here. For reference here is my functions.php file as well.

    ——
    <?php

    /*******************************************************************************************************/
    /* DEFINE CONSTANTS */
    /*******************************************************************************************************/

    define(‘THEMEROOT’, get_stylesheet_directory_uri());
    define(‘IMAGES’ ,THEMEROOT.’/images’);

    /*******************************************************************************************************/
    /* ADD MENUS */
    /*******************************************************************************************************/

    function register_my_menus() {
    register_nav_menus(array(
    ‘main-menu’ => ‘Main Menu’
    ));
    }

    add_action(‘init’, ‘register_my_menus’);

    ?>
    —–

    I appreciate the support!

    Thanks,
    Tristan.

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘@import Not Working on Custom Theme’ is closed to new replies.