• I am writing my first custom theme, and while I don’t claim ninja status I am well versed in HTML/CSS/PHP.

    When I activate my theme I get no CSS!?!?!?

    My index file looks like:

    <?php get_header(); ?>
    
    <div class="row">
    <div class="span12">
        <?php while ( have_posts() ) : the_post(); ?>
        <h2><?php the_title(); ?></h2>
        <?php the_content(); ?>
        <?php endwhile; // end of the loop. ?>
    </div>
    </div>
    
    <?php get_footer(); ?>

    In my header.php file I call my CSS with:

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

    If I view the source and click the link to the CSS it says the file is not found (and Yes I am sure I FTPed the file up to the correct directory). If I activate 20-11 and click the CSS link in the source which has the same path except for the theme name it displays the CSS code in the browser?

    The site is learn.mccarvilleinc.com

Viewing 15 replies - 1 through 15 (of 26 total)
  • Did you try moving this site or changing its urls after you installed WordPress?

    Thread Starter McCarvill

    (@mccarvill)

    You mean moving it to another subdomain? I did change the Permalinks to post name…

    You mean moving it to another subdomain?

    Yes. And/or changing the urls in Settings -> General

    Thread Starter McCarvill

    (@mccarvill)

    Both URL are set to learn.mccarvilleinc.com

    What would I change them to?

    PS trying the subdomain now.

    Thread Starter McCarvill

    (@mccarvill)

    Same thing on the new sub domain

    No! I asked you if you had changed them since WordPress was installed.

    Thread Starter McCarvill

    (@mccarvill)

    I have not changed them

    Try switching to the 2011 theme.

    Thread Starter McCarvill

    (@mccarvill)

    Works fine when I switch to 2011

    Thread Starter McCarvill

    (@mccarvill)

    BTW Thanks for your help… should have said that right away but I am beyond frustrated with this… have been fooling with it for hours. It’s like it doesn’t see the file in the directory??

    Well, at least we’ve narrowed it down to something in your theme – which is a huge step forward. Can you try swapping out the style.css file for (say) a copy of Twenty Elevens style.css file. It won’t work but it would be helpful to see if it’s being picked up properly at least.

    Thread Starter McCarvill

    (@mccarvill)

    Just uploaded the 2011 style.css and the theme info was changed in the admin panel, but no CSS on the page, and when I went into the source and clicked the link to the CSS file I got a 404 again.

    So the admin panel is picking up the info from the comments at the top of style.css but the theme is not picking up the css file?

    Ok – so it’s not some funky encoding in your stylesheet. Can you try the same exercise with 2011’s header.php?

    Thread Starter McCarvill

    (@mccarvill)

    When I uploaded 2011’s header.php the code was updated, but the CSS does not work, and I got the 404 when clicking the path in the source.

    OK – next – the functions.php file. Do you have anything in your functions.php file?

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘CSS link won't find file!?’ is closed to new replies.