0

I set magento 2 luma theme for entire site if customer not login after customer login need set ultimo theme i have installed ultimo theme i am able to set by using fallowing line $objectManager->get(\Magento\Framework\View\DesignInterface::class)->setDesignTheme('Infortis/pawan', 'frontend');

all working fine but when I write custom CSS it not loading it generating in pub folder but not loading I have place custom CSS Magento_Theme/layout/default_head_blocks.xml

my XML file

 <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <head>
 <css src="css/font-awesome.min.css" />
 <css src="css/test.css" />
 </head>
</page>

but in frontend when I login all phtml files and other files loading but CSS and js not loading any idea how

in magento 1 by using below code I can set easily I want same in magento 2 any idea Mage::getDesign()->setArea('frontend')->setPackageName('tricore')->setTheme('pawan');.

asked Jun 20, 2019 at 18:54

1 Answer 1

0

Also check that your custom css is found or give 404 error.

Go to view code, find your css/test.css path and click it. Here you can check that css is found or it gives 404 error.

answered Jun 21, 2019 at 5:24
3
  • no it not showing in browser Commented Jun 21, 2019 at 8:37
  • It means your given css path is not right. please refer this link magento.stackexchange.com/questions/108685/… Commented Jun 21, 2019 at 9:24
  • given right path web/css/test.css Commented Jun 21, 2019 at 9:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.