Where I can store CSS before pages it loads?

Posted in: Newspaper
Post count: 73

Dear, I did many CSS customizations, where I can store before pages it loads? Now I stored in Custom Css of theme but when opening page some CSS are loaded after page is loaded.

Thank’s a lot

Post count: 20688

Hi,

The custom CSS from the theme panel will be loaded after the theme stylesheet. You can also add custom CSS in a child theme stylesheet if you have one, or directly in the main theme stylesheet file.
If you add it in the main theme you will probably have to re-add it after a theme update, but this will ensure that the code is loaded faster, along with the theme style.

Thanks

Post count: 73

Thank’s a lot! Do you mean “style.css” ?
thank’s a lot!

Post count: 73

I tried to apply changes in style.css inside child theme folder but it seems is not working… I tried to apply changes also in style.css of main theme folder, but nothing happens. thank’s a lot for patience.

  • This reply was modified 8 years by 4l4.
Post count: 20688

If the code is valid, then what it is supposed to do should be visible after entering it. Maybe you have caching or a CDN. Try clearing the cache and purge CDN files if that is the case. Once entered in either the child theme stylesheet
https://www.screencast.com/t/tReNfeKeY
Or main theme stylesheet – https://www.screencast.com/t/mF667VbZ1adJ
Then the code will be loaded accordingly.

Post count: 73

Sure, code is valid of course… I have configured code in “Custom CSS” template function, but, when I moved where you told, it does not work…
I don’t have caching plugins or CDN…

Post count: 20688

I have tried this as well. For example I created a code to remove the post title in the post page
https://www.screencast.com/t/5QDVLxwBbLPx
https://www.screencast.com/t/Dcai5wh74b
I then entered it in the child theme stylesheet (be sure that the child theme is active)
https://www.screencast.com/t/GAUpB5TsZYA
The code applies – https://www.screencast.com/t/AnJDoQfs642R

Then I tried in the main theme style.css file
https://www.screencast.com/t/uQlreldT4jp
I had to force refresh the page in the browser in this case, in order to see the changes.

Post count: 73

Many thank’s for patience and advices, it seems was a cache problem…!

Many thank’s again!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.