[polyembed] shortcode. It fills in the post title for you, builds the iframe, and includes the resize and collapse script.
Install the plugin
1
Get the plugin
Email contact@polyembed.io for the current
polyembed plugin ZIP.2
Upload it
In WordPress, go to Plugins > Add New > Upload Plugin, choose the ZIP, and click Install Now.
3
Activate it
Click Activate. The plugin is called PolyEmbed Widget in your plugin list.
Add the shortcode
Copy the shortcode from the WordPress tab on your widget page:Shortcode
- In one post
- In every post
In the block editor, add a Shortcode block and paste the shortcode.
Add keywords for tighter matches
The shortcode uses the post title automatically. Addkeywords to improve matching:
single.php
Signed snippets
If your widget page shows a shortcode withd, kv and sig attributes, copy it exactly. Those attributes sign the snippet to your domain. If you rotate the embed key, replace the shortcode everywhere you use it. See Embed security.
Caching and security plugins
- Page caches are fine: the widget does its matching inside the iframe on every load.
- If a security plugin sets a
Content-Security-Policy, allowframe-src https://iframe.polyembed.io. - If an optimization plugin rewrites iframes (for example to lazy-load them), make sure it keeps the
referrerpolicyattribute and the script that follows the iframe.