This question is regarding wordpress.
I have two variables $random_n and $adcount declared in each of index.php , archieve.php, search.php and single.php files at the very first line.
The variables are declared as follows:
<?php $random_n = randomNumber();?>
<?php $adcount = 1; ?>
randomNumber() is a function inside function.php.
If I move those variables to header.php and remove them from all these files, it stops working. :/ The variables can't be found in index.php, archieve.php, search.php, single.php if they are placed in header.php
I've also tried putting this code inside a new file and including that file to index.php, archieve.php, search.php, and single.php, but it hadn't helped as well.