WordPress Ignoring CSS

RomesFall

‍‍‍
BuSo Pro
Joined
Oct 7, 2014
Messages
460
Likes
684
Degree
2
I'm starting to lose it with WordPress lately.

At the start of the week I had to uninstall a theme which was totally unworkable. None of my edits were responding, tried everything. Thought, 'Ok screw this', and bought a new theme because I'd wasted too much time already.

Everything was going smoothly with this new theme until I needed to make some custom CSS edits again.

Basically I'm just trying to code some social sharing buttons into my theme rather than using a plugin, I use SublimeText2 and Chrome to code these things up before updating my site, so I know the code was working.

First of all I created a new stylesheet for the css and hooked this into the theme, and it ignored it. Then I added the css into the existing stylesheet and it still ignored it. I've cleared my cache, purged my CDN etc.

In Developer Tools on Chrome it can see the stylesheet when I'm referencing it, but none of the styles get applied to my HTML elements.

Any ideas?
 
What theme are you using? I had the same problem with css within my posts (for example adding borders around headings etc) then I updated my theme and now it seems to work
 
What theme are you using? I had the same problem with css within my posts (for example adding borders around headings etc) then I updated my theme and now it seems to work

Well I've used two themes, one was free, the second one is a paid and up to date one by SoloPine.

I've built hundreds of websites, and customized just as many in WordPress and it just seems like it's getting more and more inhospitable for inputting code.

It doesn't make sense that I can build a regular website with HTML/CSS in a few hours with my own framework, yet sit there for 10 hours on one simple WordPress problem because it doesn't like my semantically correct code.
 
I actually experienced the same issue a few days ago. I ended up changing from ID's to Classes and it magically worked, but I knew there was more to it because it wasn't even showing these attributes in the developer tools of Safari. I had no cache or CDN enabled during this stage. I could locate my extra CSS file in the header and source code too. I logically can't figure out why this is happening unless the new Wordpress has some kind of caching going on now.
 
I actually experienced the same issue a few days ago. I ended up changing from ID's to Classes and it magically worked, but I knew there was more to it because it wasn't even showing these attributes in the developer tools of Safari. I had no cache or CDN enabled during this stage. I could locate my extra CSS file in the header and source code too. I logically can't figure out why this is happening unless the new Wordpress has some kind of caching going on now.

I think the caching might be the issue, if so it's a massive pain for making changes on the fly. Like I said, I did everything from my end to negate effects of any caching. But the problem seems to point toward caching of some kind.

I'll try dig into it some more.
 
@Ryuzaki I looked into it more, could be that it's a host issue. Depends if you have other sites with the same host and they're having the same issues. Could be a big indicator. I'm going to contact mine and see if they have anything going on their end.

I'm on shared hosting with this site though, not sure if you will be.

WordPress don't seem to have anything about them caching in the code in their codex so I don't think it's that.
 
I'm on shared hosting with this site though, not sure if you will be.

Same, this site is on Hostgator, which has gone to complete shit thanks to EIG. I'm sure they are changing things to spend less bandwidth. Let me know what you find out!
 
Are you using Cloudflare or have any other caching installed?

Other possibility is the priority of your stylesheets. Something could've moved your child theme stylesheet lower than let's say the bootstrap one.
 
Are you using Cloudflare or have any other caching installed?

Other possibility is the priority of your stylesheets. Something could've moved your child theme stylesheet lower than let's say the bootstrap one.

I use MaxCDN, but I have it turned off. I'll check the stylesheet priorities, hopefully it's that.

Thanks for the tip :smile:
 
I use MaxCDN, but I have it turned off. I'll check the stylesheet priorities, hopefully it's that.

Thanks for the tip :smile:
Yea, ok. Feel free to PM me the site too if you want me to take a quick look. If you do, message me the name of the stylesheet file too (shows in Appearance>Editor).
 
Yea, ok. Feel free to PM me the site too if you want me to take a quick look. If you do, message me the name of the stylesheet file too (shows in Appearance>Editor).

Thanks mate. I've got it figured out now... It looks like I'd made independent edits on my .htaccess file at some point last year and forgot about it. So turning off the caching plugin wasn't removing all of the rules!

I feel pretty stupid... All it took was firing up my FTP client and a copy/paste job out of the file. *doh*
 
Back