I try to add assets directory inside a theme.
function my_cssscripts_method() {
wp_enqueue_script(
'css-custom-script',
get_stylesheet_directory_uri() . '/assets/styles.css'
);
}
add_action( 'wp_enqueue_scripts', 'my_cssscripts_method' );
Is this the correct code or it can be improved?
Did you incorporated on live ?
No
I have never done. Have you done the correct placement for asset?
Blockquote
function my_cssscripts_method() {
wp_enqueue_script(
'css-custom-script',
get_stylesheet_directory_uri() . '/assets/styles.css'
);
}
add_action( 'wp_enqueue_scripts', 'my_cssscripts_method' );
> Blockquote
that code is correct
system
Closed
6
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.