• Aloha,

    I want to add a variable to my template header.php, so I can easily enable/disable ads, etc.

    <?php $adsSwitch = false; ?>

    Problem is I can’t see it in index.php. There is no problem accessing it in header.php.

    <?php

    if($adsSwitch == true)
    {
    // Show annoying ads
    }

    ?>

    Thanks.

Viewing 1 replies (of 1 total)
  • yep, same here. added some code to the header.php and try to read the variables in sidebar.php – they are gone it seems.

Viewing 1 replies (of 1 total)
  • The topic ‘Variable in header.php not found in index.php’ is closed to new replies.