1 Answer
I guess you declare your phtml
file in <your theme dir>/Magento_Cms/layout/cms_index_index.xml
, so your phtml
file (which contains popup
HTML div) is only available on the homepage.
In order to add your phtml
file to all pages, you should declare it in default.xml
in your module or your theme:
<your theme dir>/Magento_Theme/layout/default.xml
<your module dir>/view/frontend/layout/default.xml