Does anyone know if the handles in the wp_register_style and wp_register_script functions need to be unique in both functions, or just in their respective functions?
For example, will this code cause problems?
wp_register_style( 'bootstrap-twitter', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css', array(), '5.1.3'); wp_register_script( 'bootstrap-twitter' 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.3/js/bootstrap.bundle.min.js', array( 'jquery' ) '5.1.3'); wp_enqueue_style( 'bootstrap-twitter' ); wp_enqueue_script( 'bootstrap-twitter' );
I didn't find the answer in the documentation and some online searches. I might just have a problem with my search though.
In WordPress, handles to styles and scripts are saved in different locations to avoid conflicting with each other. There is nothing wrong with your code.