Complement script tag

How or where can I add these tags with “<script type = ‘text / plain’ data-cookieconsent = ‘technical’ src = …”:

<script type = 'text / javascript' src = 'https: //www.domain.com/wp-content/plugins/cornerstone/assets/dist/js/site/cs-head.js? ver = 2.1.7' > </ script>
<script type = 'text / javascript' src = 'https: //www.domain.com/wp-content/plugins/cornerstone/assets/dist/js/site/cs-body.js? ver = 2.1.7' > </ script>
<script type = 'text / javascript' src = 'https: //www.domain.de/wp-content/themes/x/framework/legacy/cranium/js/dist/site/x-head.min. js? ver = 5.2.5 '> </ script>
<script type = 'text / javascript' src = 'https: //www.domain.de/wp-content/themes/x/framework/legacy/cranium/js/dist/site/x-body.min. js? ver = 5.2.5 '> </ script>
<script type = 'text / javascript' src = 'https: //www.domain.de/wp-content/plugins/testimonials-showcase/resources/bxslider/jquery.bxslider.js'> </ script>

Hello @Stammen-Grote,

Thanks for asking. :slight_smile:

I believe the question is regarding adding additional scripts. A relatively easy and convenient way to add custom scripts is to use plugins like Insert Headers and Footers. You can visit following URL’s to download and learn more about the plugin.


Thanks.

Hello,

thanks for the reply, but I think you have misunderstood something.
I do not want to add scripts I would like to add something to the X-theme’s own scripts.
I want to change the “<script type = ‘text / javascript’ src =” to this "<script type = ‘text / plain’ data-cookieconsent = ‘technical’ src = … "

Hi,

You can add those attributes by applying filter to script loader tags.

Kindly refer to the link below

https://developer.wordpress.org/reference/hooks/script_loader_tag/

Hope that helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.