Custom variables that are in a custom
global.php file are not being passed to a
homepage.php, I have set up as the static homepage for WordPress. It just gives null errors as if the variable doesn't exist. Is it something that wordpress is doing? Should I have the database connection variable in a the function.php file?
Error: Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/test/homepage-file.php line
Anyone have any ideas?
custom-global.php: <?php $db = mysqli_connect(xxx); ?> homepage-file.php: <?php require_once("custom-global.php"); mysqli_query($db, "XXX"); ?>