Title: Calling a function in  for theme options
Last modified: August 20, 2016

---

# Calling a function in for theme options

 *  [ken90](https://wordpress.org/support/users/ken90/)
 * (@ken90)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/calling-a-function-in-for-theme-options/)
 * I’m developing a theme and there’s an option where users can enable “custom settings”
   for color/text. My function looks something like this:
 *     ```
       function tmpname_theme_custom_styles() {
       if ($options['enable_header_customization']) : ?>
       	<style type="text/css">
   
       	</style>
       	<?php endif;
       	}
       ```
   
 * It’s all working etc, BUT is calling this function in header.php in between <
   head> tags is a proper way of doing it? Moreover, it looks like
    this:
 *     ```
       <head>
       <?php wp_head(); ?>
       <?php tmpname_theme_custom_styles(); ?>
       </head>
       ```
   
 * Shouldn’t function call be placed above wp_head? If I place function call above
   wp_head it just stops working.

The topic ‘Calling a function in for theme options’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [ken90](https://wordpress.org/support/users/ken90/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/calling-a-function-in-for-theme-options/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
