Support » Plugins » Adding plugin's stylesheet to wp_head

  • I am trying to add my plugin’s stylesheet into wp_head using this code

    //adding link to plugin's stylesheet in wp-head
    
    	function my_plugin_stylesheet() {
    	$url = plugins_url();
    	echo "<link rel='stylesheet' href='.$url./plugin_style.css' type='text/css' />";
    	}
    add_action('wp_head','my_plugin_stylesheet');

    But this code is not working. Can someone please tell me what I am doing wrong?

  • The topic ‘Adding plugin's stylesheet to wp_head’ is closed to new replies.