testing 2

When you’re ready for a more flexible setup, the next step is usually auto-resizing the iframe to its content (same-domain postMessage) or packaging the tool as a small WordPress plugin/shortcode so it renders inline without iframe height hacks.

A clean way to make it portable and easy to wrap into WordPress

  • Keep the app stand-alone (no WordPress calls): make each HTML entry file load only your app assets and render into a unique root container (e.g. <div id="app"></div>), and avoid touching window.top/parent except for optional resizing.
  • Put all “WP accommodations” into a thin wrapper layer you can swap:
  • Iframe wrapper (portable): WordPress page embeds /wp-content/plugins/rlr-mpg/*.html via iframe.
  • WP plugin wrapper (native): a shortcode like [rlr_mpg page="shorty"] that enqueues the same JS/CSS and prints <div id="rlr-mpg-shorty"></div>.

To be specific about what to strip, paste the parts of your current HTML/JS that are WP-specific (any wp_admin-ajax.php, nonce, wp_enqueue_*, or references to window.wp), and tell me whether the app needs WP login/data—or should stay fully standalone.

Scroll to Top