Where to include JS library in gutenberg blocks
Where to include JS library in gutenberg blocks
Where to include JS library in gutenberg blocks
The answer for me was setting the X-WP-Nonce with the wpApiSettings.nonce in the headers.
Rather than trying to include jquery with your javascript, you should use wordpress to define jQuery as a dependency to your custom script. function custom_js_script_enqueue(){ wp_enqueue_script( ‘mycustomjs’, CHILD_THEME_URI . ‘/assets/js/my-custom-js.js’, array(‘jquery’), ‘1.0.0’ ); } add_action(‘wp_enqueue_scripts’, ‘custom_js_script_enqueue’); you can read about all of the libraries available in wordpress here. Your script should not include the jquery … Read more
You can use the below code with the required changes in the theme’s function file. Refer to the documentation for more info wp_enqueue_scripts add_action wp_deregister_script add_action( ‘wp_enqueue_scripts’, ‘remove_thrive_appr_main_script’ ); function remove_thrive_appr_main_script() { wp_deregister_script( ‘handle-of-style’ ); } Note – ‘handle-of-style’ = handle of style (You have to replace it with your own one) I hope this … Read more
No, you cannot. You can add extra controls to a blocks toolbar or inspector because filters were added to the code that constructs those user interfaces. Think of it as being handed lego buildings before they’re placed as an opportunity to add extra bricks. What you’ve asked however is filtering individual components, which is not … Read more
Table block variation with header section activated
Anyway to disable the auto excerpt creation?
WordPress Gutenberg: Attribute overwritten by block duplicate
I see a couple of issues in the code you have posted. The script tag should be written properly: <script type=”text/javascript”> //Code </script> It is document.write, with a small case d. If your code is in a separate JavaScript file, then you can include it and mention the source in the script tag. If you’re … Read more
Google API’s now requires API key for new domains, you should create an API key as per instructions here: https://developers.google.com/maps/documentation/javascript/get-api-key and edit the line in the plugin that loads the Google Maps API to include your key as the value of a ‘key’ parameter. Wherever you find one of these: “https://maps.googleapis.com/maps/api/js“ or “http://maps.googleapis.com/maps/api/js” in the … Read more