• Hey i am creating a plugin for my site Hangupin.I tried to add the following code.But file name is not appearing in page source.Here’s the code below.

    $url = $style.'/share.css';
    add_action('wp_enqueue_scripts','my_styles');
    function my_styles() {
        wp_register_style( 'media-share', plugins_url($url));
        wp_enqueue_style( 'media-share' );
    }

  • The topic ‘How to Add Variable in Wp_Register_style’ is closed to new replies.