Question
So, wp_localize_script() are awesome to add custom data to a script. And these data gets added to the HTML like: <script id='woocommerce_some-js-extra' type="text/javascript"> var wc_some_params = {"key":"sdfsfsdfs","use_iframes":"1","images_dir":"https://dadadasdad.com/wp-content/plugins/woocommerce-some-gateway/assets/images"}; </script> This is all good. But the problem is that if I want to add an extra ...
0
, , , 2 months 0 Answers 44 views

Question
I have a very simple JS script called script_1.js sitting at the root level of my twentytwelve-child theme. This script contains only: $(document).ready(function(){console.log("scriptLoaded"); }); and I've loaded it with the functions.php: function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', ...
0
, 2 months 0 Answers 36 views

Question
I have an acf field 'select' that i want to remove some options from using js but i can not acces the field it returns undefined <select id="acf-block_5f35006ff2da4-field_5f3cce8a89941" class="" name="acf-block_5f35006ff2da4[field_5f3cce8a89941]" data-ui="0" data-ajax="0" data-multiple="0" data-placeholder="Select" data-allow_null="0"> <option value="transparent">Transparent/bakgrundsfärg</option> </select> I have tried with ...
0
2 months 0 Answers 25 views