WP Codex
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.
How To Load A Javascript File Only On A Specific Page In WordPress
Wrap wp_enqueue_script() in a conditional tag so the file loads only where it is needed.
How To Enqueue A Javascript File In WordPress
Use wp_enqueue_script() inside the wp_enqueue_scripts hook to load your JS file the right way.
Get Page Content By Id
Displays the full title and content of a specific WordPress page by its ID, using WordPress’s native filters to preserve the page’s formatting and generated content.
Get Page Content By Title
Displays the full title and content of a specific WordPress page by its page title, using WordPress’s native filters to preserve the page’s formatting and generated content.


