CMS Development

AMinnamon
Member

Cloned Hubspot theme is loading original theme CSS files

Similar issue here using same theme: https://community.hubspot.com/t5/CMS-Development/Conflicting-CSS-when-using-Child-theme-and-a-delete...

 

I have cloned a theme in order to create new pages with different global elements. I have renamed the main.css file that is loaded into the header yet the original theme main.min.css file still gets loaded

 

base.html setup:

<head>
<meta charset="utf-8">
<title>{{ page_meta.html_title }}</title>
{% if site_settings.favicon_src %}<link rel="shortcut icon" href="{{ site_settings.favicon_src }}" />{% endif %}
<meta name="description" content="{{ page_meta.meta_description }}">
{{ standard_header_includes }}
{{ require_css(get_asset_url('../../css/main_2.css')) }}
{{ require_js(get_asset_url('../../js/main.js')) }}

</head>

 

Rendered stylesheets in the <head>:

<link rel="stylesheet" href="/somepath/atlas-theme_mcd-dev/css/main.min.css">

 

<link rel="stylesheet" href="/somepath/Scholarship_Theme_MCD/css/main_2.min.css">

 

Not sure if this is a problem with the atlas theme I am using or a common issue when cloning.

 

Thanks!

 

0 Upvotes
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Cloned Hubspot theme is loading original theme CSS files

Hi @AMinnamon ,

This time try this method :-create one new css and js file in respective folder and paste all your css and js in it and after that copy the path of that css and js and then paste it to base.html {{ require_css(get_asset_url('paste your copy path')) }} and this time don't make any changes in path like ..//..//(avaoid this path)

Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.