Skip to main content
Fixed a typo
Source Link
birgire
  • 67.8k
  • 7
  • 119
  • 251

I believe you need to add __FILE__ to your plugin_urlplugins_url() function. It may not be calling the right location. It should look like this:

add_action( 'wp_enqueue_scripts', 'wpse_238154_register_plugin_styles' );

function wpse_238154_register_plugin_styles() {
    wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css', __FILE__ ) );
}

I believe you need to add __FILE__ to your plugin_url() function. It may not be calling the right location. It should look like this:

add_action( 'wp_enqueue_scripts', 'wpse_238154_register_plugin_styles' );

function wpse_238154_register_plugin_styles() {
    wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css', __FILE__ ) );
}

I believe you need to add __FILE__ to your plugins_url() function. It may not be calling the right location. It should look like this:

add_action( 'wp_enqueue_scripts', 'wpse_238154_register_plugin_styles' );

function wpse_238154_register_plugin_styles() {
    wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css', __FILE__ ) );
}
Source Link
Ethan Rævan
  • 4k
  • 5
  • 27
  • 55

I believe you need to add __FILE__ to your plugin_url() function. It may not be calling the right location. It should look like this:

add_action( 'wp_enqueue_scripts', 'wpse_238154_register_plugin_styles' );

function wpse_238154_register_plugin_styles() {
    wp_enqueue_style( 'fh-plugin' , plugins_url( 'nf-plugin/includes/f-hide.css', __FILE__ ) );
}