On our companies website, we have a list of products, then when you click on a product, a popup opens with the product details. Because this was a popup (in a lightbox) I created a
single-productpopup.php and removed the header and footer.
The problem I have now, is that the Products are showing up in the Sitemap, and therefore search engines (and this is what we want), but when the link is clicked, the
single-productpopup.php is loaded, and this doesn't have a header or footer, so the visitor has no way to continue navigating around the site.
What I'm hoping is is there a way to detect if the page is being loaded in an iframe, and so do an if statement something like
if page is not in iframe show header and footer
Or is there a more practical way to do this, maybe with different php files?
Edit: After thought - or add the header and footer with