WordPress.org

Ready to get started?Download WordPress

Forums

Adding plugin's stylesheet to wp_head (1 post)

  1. troyward
    Member
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic