Grow your CSS skills. Land your dream job.

WordPress Woes

  • # January 13, 2011 at 7:37 pm

    I’m doing Chris’s Creating and Editing Custom Themes from Lynda.com and using the exercise files and am having a lot of trouble with the links and paths to files and images. For example, Chris puts the product.css file in the theme and links to it from the header using

    < ?php if (is_page_template('page-product.php')) { ?>

    < ?php } ?>

    If I put it in the same place and use the same link, it doesn’t link.
    I have tried putting it in the root of the theme like style.css and linking with either /product.css or product.css , still no joy
    The only way I can get it to show is to paste the css into the style.css

    The .htaccess file is as follows:

    Code:
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /widgetcorpWP/
    RewriteRule ^index.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /widgetcorpWP/index.php [L]

    # END WordPress

    Am I right in thinking that this has something to do with it? Any ideas, this is driving me nuts.

    Rob
    # January 14, 2011 at 7:40 am

    Hey :)

    do you have a space in the real code?

    Coz that would probably be outputting:

    http://yoursite.com/wp-content/themes/yourtheme /css/product.css

    which would break, as you can see :)

    # January 14, 2011 at 11:17 am

    Thanks, but that’s not it, I tried several things and have removed the space in the code, it’s good to know that.
    Got it now, sometimes the brain gets stuck on one thing and can’t see anything else. The template name had a typo.
    Thanks

    Rob
    # January 14, 2011 at 8:24 pm

    Ahh the good old typo :D

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".