Passing variables to header.php
-
Hi, I’m attempting to pass a variable from single.php to header.php.
For example in single.php I have:
<?php $wrapperstyle = "wide";?>
I want to somehow pass this to the body_class as well.
<body <?php body_class('$wrapperstyle'); ?>>
Is this possible?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Passing variables to header.php’ is closed to new replies.