For certain reasons I have to add a bit of style (margin) to the footer of the page. It should only be applied when the content part of the page is a product archive.
I tried to create a variable in the archive-products.php file like this:
<?php global $template;
$template = 'prodarchive';
var_dump($template);?>
According to the var_dump the value is set. Next I tried to call it in my footer.php like this
<?php if ($template === 'prodarchive' ) {?>
and then the stuff it needs to do.
Some tests shows me that the footer.php file is not able to reproduce the value of $template. What is wrong?