get_header(); vs include(TEMPLATEPATH . ‘/header.php’);
-
I have set a variable at the top of ‘home.php’ to display some extra content on the my homepage. The extra content that gets displayed is located in header.php. So the variable is set, then header.php gets called.
For some reason, the variable that is set in home.php only gets parsed in header.php if I use “include(TEMPLATEPATH . ‘/header.php’);”.
It took me a while to figure out what was happening. I guess this is okay for my theme, but it does not make any sense to me. Would using “get_header();” prevent the variable from being seen?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘get_header(); vs include(TEMPLATEPATH . ‘/header.php’);’ is closed to new replies.