How to Load Contents from A Custom Phtml File for Magento 2.4?

First, we create the .phtml file, say footer_menu.phtml, and place it under add/design/Young/goggles/Magento_Theme/templates/. Add the following code: Next, edit default.xml, which is under add/design/Young/goggles/Magento_Theme/layout/. Add the following code to a proper place. Run bin/magento c:f Besides the basic html code we can add in a .phtml file, we also can add php code, say: We… Continue reading How to Load Contents from A Custom Phtml File for Magento 2.4?

Published
Categorized as PHP