Posts can display a wide variety of interactive content, like maps, data tables, and other content from other sources. Most regular posts should use the One Column (Standard) template. This template provides the best reading experience when the post is comprised of mostly text. For posts containing interactives and visual elements wider than the One Column Template, you can optionally select the Full-width template in the Layout Options panel.
Embedding Responsive Content via iframe
By default, content hosted on another server and embedded in a WordPress post won't resize responsively for mobile devices. Embedded videos can be made responsive by using the Module Wrapper, but other types of interactive content can be more difficult to make responsive. In particular, the Module Wrapper won't work with any embeds that contain
<script> tags because they're not allowed by WordPress.
In this case, you can use the Pym Shortcode plugin, built by INN to allow embedded content in WordPress posts and pages using a simple shortcode. If the embed is built to work with Pym.js, Pym Shortcode will responsively resize an embed's width for mobile devices, and its height based on the width of its container.
Use of Pym.js with WordPress posts and pages requires:
- Hosting the embedded content on another web server. You can use any server, including Amazon Web Services, GitHub Pages, or any other web server you have access to. Unfortunately, our hosting company is optimized for hosting only your WordPress website so we're not able to host standalone data apps and interactives. The content of the iframe should not contain any design elements other than the actual content you want to display in WordPress. Things like navigation, excess padding around the edges of the graphic will negatively affect the appearance of the embed on your site.
- The Pym script must be included on the web page where the embedded content is hosted.
- The Pym Shortcode plugin must be installed and activated on your WordPress site.
For more on using Pym Shortcode, see the Pym Shortcode docs.