I am focusing on a custom wordpress theme with some after sales admin system.

Why I have to declare


global $options

foreach ($options as $value) configurations( $value['id'] ) === FALSE)  else configurations( $value['id'] ) 



multiple occasions in header and footer? Because my index.php file includes header.php and footer.php. Why can't I declare once in the header.

thanks :)

I am speculating it's related to your use of $options and variable scope. While you'll most likely need global $options wherever you need to use that variable, you most likely just have the foreach loop there only the very first time.

Also, get_settings() is deprecated, use get_options() rather.