Hook into wp_head(); in a plugin

Did you try this?

function hook_header() {
  $example_position = get_theme_mod( 'logo_placement' );
    if( $example_position != '' ) {
        switch ( $example_position ) {
            case 'left':
                // Do nothing. The theme already aligns the logo to the left
                break;
            case 'right':
                echo '<style type="text/css">';
                echo '#main-header #logo{ float: right; }';
                echo '</style>';
                break;
            case 'center':
                echo '<style type="text/css">';
                echo '#main-header{ text-align: center; }';
                echo '#main-header #logo { text-align: center; float: none; margin: 0 auto; display:block; }';
                echo '</style>';
                break;
        }
    }
}
add_action('wp_head','hook_header');

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)