• 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.