PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, August 22, 2022

[FIXED] why is default_head_blocks.xml not removing the css files?

 August 22, 2022     magento, magento2     No comments   

Issue

I have put 2 remove tags inside default_head_blocks.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <remove src="css/print.css"/>
        <remove src="css/styles-m.css"/>
    </head>
</page>

The file is under app/design/frontend/<theme>/Magento_Theme/layout/

But the css files are not being removed. Should I put the file in a different directory?


Solution

Directory is correct. can you please try to flush cache and check again.



Answered By - Mayur jadeja
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing