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');.
1 Answer 1
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.
-
no it not showing in browserPawankumar– Pawankumar2019年06月21日 08:37:24 +00:00Commented Jun 21, 2019 at 8:37
-
It means your given css path is not right. please refer this link magento.stackexchange.com/questions/108685/…Chirag Parmar– Chirag Parmar2019年06月21日 09:24:38 +00:00Commented Jun 21, 2019 at 9:24
-
given right path web/css/test.cssPawankumar– Pawankumar2019年06月21日 09:27:43 +00:00Commented Jun 21, 2019 at 9:27