Tag main
How To Add Inline Javascript In WordPress With Wp_Add_Inline_Script
Attach a small piece of JS to an already enqueued script. Use 'after' to print it after the script, or 'before' to print it before.
How To Use Jquery Correctly In WordPress
Declare jquery as a dependency and wrap your code in a function. WordPress runs jQuery in noConflict mode, so $ is not available globally.
How To Make An Ajax Request In WordPress With Admin-Ajax.php
Register a PHP handler with the wp_ajax_ and wp_ajax_nopriv_ hooks, then call it from JavaScript with fetch(). This example requires the lotgrafixData object from the wp_localize_script() post.
How To Pass Php Data To Javascript In WordPress With Wp_Localize_Script
Use wp_localize_script() to expose PHP values such as the AJAX URL, a nonce or the site URL to your JS file.
Cdn Libraries
CDN Libraries lets you load popular CSS and JavaScript libraries in WordPress from the jsDelivr CDN, without editing theme files or writing wp_enqueue code. Enable Bootstrap, Font Awesome, Bootstrap Icons,…


