Globals in footer.php
|Reported by:||enailor||Owned by:|
For some reason, globals and typical WP functions do not seem to be working in theme footer.php files.
Setting a variable to global seems to permit calling that variable anywhere with exception of the footer.php file in which the variable is lost. This also applies to the is_front_page() function which does not work in the footer. (I have not tested other WP functions to know which ones do and do not work in footer)
In the forums, one suggestion is that global variables need to be redeclared as global and they will work. However, I am unaware of any way to redeclare the WP functions so that they will also work in the footer.
Variables and functions should be available in the footer as well.
Change History (6)
- Keywords reporter-feedback added; footer.php variables functions removed
- Priority changed from high to normal
- Severity changed from major to normal