Daniel
April 24, 2023, 5:43pm
2
This solution by @h_classen should help resolve this (place the code in the 'head' of your Wordpress page or above your Wordpress shortcode as a code block:
In this super popular code snippet, I thought it would be useful to have chat GPT add some code comments to explain the magic of what's going on. This is a very useful snippet for folks embedding responsive documents within Wordpress where you want a fixed ratio based on the active responsive layout:
<script>
// Define the layoutRequest function
function layoutRequest(hypeDocument, element, event) {
// Get an array of all layouts for the current scene
var _layouts = hypeDocument.lay…