As per the title, is it possible?
I can get JS scripts imported into a page by this in the Code Block Content:
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
But when I try this in Code Block
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
it is ignored, and the line is not in the HTML on the live page.
Hey zimbo,
Thank you for the inquiry.
We do not recommend adding stylesheets or script files using link, input or script tags directly in the Advance Layout Builder as this may break the layout of the page. Instead, you should consider using the wp_enqueue_style or wp_enqueue_script functions.
// https://developer.wordpress.org/reference/functions/wp_enqueue_script/
// https://developer.wordpress.org/reference/functions/wp_enqueue_style/
If you want to register the resources only on specific pages, you can use conditional functions such as is_page.
// https://developer.wordpress.org/reference/functions/is_page/
Best regards,
Ismael