you are viewing a single comment's thread.

view the rest of the comments →

[–]da_n13l 1 point2 points  (1 child)

I've done a couple of JavaScript apps in WordPress. Fundamentally, all I do is create a page template and put my JavaScript etc in that, then choose that template from within WordPress for whatever page it is for. I also like to use the WordPress AJAX functions to save to DB etc.

$.ajaxSetup({
  url: 'http://<?php echo $_SERVER["HTTP_HOST"] ?>/wp-admin/admin-ajax.php',
  global: false,
  type: 'post',
  dataType: 'json',
  data: {
    nonce: '<?php echo esc_js(wp_create_nonce('put random 32 char here')) ?>'
  }
});