Support » Themes and Templates » style.css not working

  • Resolved bman1

    (@bman1)


    I can’t seem to get the stylesheet for my custom theme working. I’ve tried both absolute and relative linking and I refresh the browser using CTRL + F5. I’ve also disabled off varnish cache using .htaccess.

    conceptualimprints.ca/wptww/

    Any help would be appreciated. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The link href should be the full absolute URL to the stylesheet. Something like:

    <link href=”http://myserver.mydomain.com/wp-content/themes/urbanwords/style.css” media=”all” type=”text/css” rel=”stylesheet”>

    If you paste the href into your browser’s address bar and hit return, you should see the stylesheet code in the browser window. For example, here’s one I did earlier:

    http://www.urbanwords.org.uk/wp-content/themes/urbanwords/style.css

    If your stylesheet doesn’t show up you need to check all the URL parts to find out which bit is wrong.

    Couple of other things to check:

    1. Your stylesheet is called style.css
    2. The proper comment block appears at the top of the stylesheet

    Good luck.

    Cheers

    PAE

    Michael

    (@alchymyth)

    Forum Moderator

    the code to call the style.css of a theme would generally be:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

    (assuming that you followed the standard folder and file structure)

    Thanks for the help both of you.
    The style works properly with the following <link> code:

    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘style.css not working’ is closed to new replies.