I am working on magento 2.1 extension in which i have to show popup on all pages. I have write a code for popup which is showing on only one page but i want to apply that code on all pages.
go to your module file add this code in your
default.xml you file path will be Vendor/Modulename/view/frontend/layout/default.xml
<referenceContainer name="after.body.start"> <block class="Magento\Framework\View\Element\Template" name="afterbody" template="Vendor_Modulename::youfile.phtml"/> </referenceContainer>