WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] style.css not working (4 posts)

  1. bman1
    Member
    Posted 2 years ago #

    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.

  2. peredur
    Member
    Posted 2 years ago #

    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

  3. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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)

  4. bman1
    Member
    Posted 2 years ago #

    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' ); ?>" />

Topic Closed

This topic has been closed to new replies.

About this Topic