1

This is my first time creating a WP template. I used this tutorial: http://themeshaper.com/2012/10/22/the-themeshaper-wordpress-theme-tutorial-2nd-edition/

I am editing the style.css file that is in the template folder (WCCB Theme - Copy). It is on XAMPP, a local server, so there is no FTPing anything. I edit the file, and refresh my browser and nothing happens. Currently I only have one style in there, making H2s red, and the rest is blank (except for the header comment). Not sure what I'm doing wrong.

1: When I view the source, the file is listed as a stylesheet that is applied. 2: When I go directly to the URL of the file the browser can find it. 3: When I use the developer tools to inspect my H2, it says only user agent styles are being applied.

Initially it appeared as a caching issue, but I have cleared my cache (Chrome). I have no idea what is wrong. How can I get my CSS to udpate?

2
  • 1
    Are you sure you've targeted the h2 element correctly? Should be like this: h2 {color:red;} Commented Feb 5, 2013 at 23:10
  • @Omega Yes, that is exactly how I have it. Commented Feb 5, 2013 at 23:18

4 Answers 4

1

Go to the template folder (usually under: /var/www/html/wp-content/themes/<your theme>) and edit the file: header.php (don't forget to back it up first!)

replace the line:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>" media="screen" />

with:

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url') ?>?v=123" media="screen" />

and refresh the page. If it wasn't refreshed and you're using WP Super Cache - delete the cache.
Still didn't refresh? run from prompt service httpd restart (it restarts the Apache) and try again. Worked for me!

Sign up to request clarification or add additional context in comments.

Comments

0

I know I had problems like that before. Try ctrl+f5 to do full reload.

1 Comment

Yeah, tried that one too. Didn't do anything. I got it working somehow though.
0

Not sure how I fixed this. I deleted the template from the WP admin panel and added it again with a different name and some CSS changes already made. It worked. Now I can change my CSS file and refresh my browser and the changes appear. Not sure what happened.

Comments

0

What I usually do is open the page on the Incognito Mode(Ctrl + Shift + N) - if you are using Mac (cmd + shift + N).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.