Passing PHP Variable Between Template Files
-
I’m trying to pass a PHP variable ($pageTitle) that I define in the top section of each template page (i.e. 404.php) so that I can call up a specific CSS file for unique page styling. It works when I hard-code the variable into the header.php file, which is checking for the $pageTitle variable, but not when I put it in an individual page and try to pass it to the header.php. I’ve done this on multiple other sites that don’t use WordPress without a problem. Can WordPress not support this basic functionality? Is there an additional way to define this in WordPress?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Passing PHP Variable Between Template Files’ is closed to new replies.