[Resolved] function enqueue depend of dynamic url
-
Hello there
I want to enqueue style into a specific sub page /user/profile/change-avatar
I try several codes like this
add_action('wp_enqueue_scripts', 'cutting',100); function cutting() { $uri = $_SERVER['REQUEST_URI']; if(strpos($uri,'members/'. $current_user->user_login .'profile/change-avatar') == true){ wp_register_style( 'connected4', get_stylesheet_directory_uri() . '/connected4.css' ); wp_enqueue_style( 'connected4' ); } }
Unfortunatly it’s not working.
Could help me please?
Thanks
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[Resolved] function enqueue depend of dynamic url’ is closed to new replies.