Tagged: Code block
Hello,
When I added the <script> or <style> On “Code Block” element and click update page.
I found the script is auto added <p> <br> html tag. How we can fix this?
Regards,
Hey StuWeTueHo,
Thank you for the inquiry.
Try to remove the spaces between the scripts and css rules, or just use the wp_enqueue_script or the wp_enqueue_style functions to safely load the css and scripts from external files.
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/
// https://developer.wordpress.org/reference/functions/wp_enqueue_script
Best regards,
Ismael