Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 12d 04h 51m 57s
Claim 50% off
Awaiting an answer Templates

Custom CSS file not loaded the last in Newsberg

Asked by federico Fernandez de Santos Ortiz 4 years ago Last activity 4 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!

2 replies

Rashida Rahman Staff

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

federico Fernandez de Santos Ortiz Asked this

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.

Log in to reply.