We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jan 20, 2022 4:36 PM - edited Jan 20, 2022 4:38 PM
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!
Jan 21, 2022 3:25 AM
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.