Custom CSS File Not Loaded The Last In Newsberg - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Custom CSS File Not Loaded The Last In Newsberg

FO

federico Fernandez de Santos Ortiz

Template 3 years ago

I've noticed that in latest Newsberg template version (also latest Helix Ultimate version) custom.css file is not loaded the last of all css files, and therefore all "overrides" of existing styles in template.css are not working. I think this could be considered a "bug", as custom.css is intended precisely for such modifications.

I've tried to find a way to fix this without modifying non-overridable template files, to no avail. The solution I've finally used has been slightly modifying template's index.php. I just moved line 154

$theme->add_css('custom');

to line 165, so it's loaded the last of all CSS resources.

Would it be possible to include that modification in next Newsberg version? Or in case there's a better solution to this problem, I'd be more than willing to use it (using "custom CSS" textarea in Helix settings is not a better solution, btw).

Thanks!

0
2 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 3 years ago #66623

Hi there!

Sorry for the inconvenience.

You may try the "Custom Code" tab in your Template Options, The top field is "Before /head" and in there, you just need to add:

<link href="/templates/shaper_newsberg/css/custom.css" rel="stylesheet" type="text/css" />

However, I will check and let our team know about it.

Best Regards

0
FO
federico Fernandez de Santos Ortiz
Accepted Answer
3 years ago #66632

Thanks for the quick answer.

Wouldn't that load custom.css twice? This would definitely avoid the need of tweaking index.php, but I still believe it's not an optimal solution. Unless there's something I'm missing, I think that changing that line in index.php is the best solution for this issue.

Of course, I could rename the file and load it the way you say, but then, what's the point in offering "custom.css support" in the framework (i.e., the framework will look for such file inside template's /css folder and, if it exists, load it)? My point is that not loading custom.css in the last place makes that "feature" almost unusable.

Thanks for your help.

0