How to Embed a Simulation in WordPress

Updated 2026-10-02

If you write a teaching blog, run a department site or post homework on a school website built with WordPress, you can embed a simulation in WordPress so readers run a live experiment inside the post. There are two ways to do it: paste the embed code into a Custom HTML block, or paste the play link on its own line and let WordPress build the embed. This guide shows both with Simulic, explains which one to pick, how to get the height right and what to do when WordPress quietly removes the frame. It finishes with ideas for teaching posts that use a simulation well.

What you need

  • A free Simulic teacher account. Readers and students never need one.
  • A WordPress site where you can edit posts or pages.
  • For the Custom HTML method, a user role that is allowed to save HTML such as iframes. On a standard single WordPress site, Administrators and Editors usually can; Authors and Contributors usually cannot. Ask your site administrator if you are not sure.
  • A simulation and a share link for it.

Which method should you use?

Paste the play link Custom HTML block
Effort Paste one line Paste the embed code
Height Chosen by WordPress and your theme You set it
Questions below the simulation May need scrolling inside the frame Frame grows with the content, or you raise the height
Works for every user role Usually Only roles allowed to save HTML

Start with the play link. If the result is too short, or the link stays a plain link, switch to the Custom HTML block.

  1. Open the simulation page and click Share.
  2. On the Simulation tab, set the starting values readers should begin with. They are pinned to the new link.
  3. Go to the Share Links tab. Under New link, name the link after the post, for example "Blog · Galton board post", choose the Language and click Create link.
  4. In the link card, click Copy link for method A, or open Embed code and click Copy embed code for method B.

Use a separate link for each post. Each link keeps its own play count and its own answers, so you can see which post readers actually use.

Simulic supports oEmbed, the standard WordPress uses to turn a pasted link into an embedded frame.

  1. In the post editor, put the cursor on a new, empty line.
  2. Paste the play link (it looks like https://simulic.com/p/…) on its own, with nothing else on the line.
  3. Wait a moment. If WordPress recognizes the link, it shows a preview of the simulation in the editor.
  4. Preview the post, then publish or update it.

If the link stays plain text, your site or your editor did not create the embed. That depends on the WordPress setup, not on the link. Use method B instead.

The frame created this way has a fixed size chosen by WordPress and your theme. That suits a simulation on its own. If you attach questions to the link, the frame may be too short to show them without scrolling.

Method B: Custom HTML block

  1. In the block editor, add a Custom HTML block where the simulation should appear (search for "Custom HTML" in the block inserter).
  2. Paste the embed code from Simulic.
  3. Switch the block to its preview to check that the simulation loads.
  4. Preview the whole post, then publish or update it.

In the classic editor, switch the editor to its HTML (code) view before you paste, then switch back and save. Menu names differ between WordPress versions, themes and page builders, so look for the option that lets you edit HTML.

The embed code starts with an <iframe> at 640 px tall and ends with a small script that makes the frame grow with its content, plus a line "Simulation by Simulic". When WordPress keeps the script, the frame resizes itself when questions appear. When it removes the script, the frame stays 640 px tall:

  • Simulation only: 640 px is fine.
  • With 2–3 questions: change height="640" to about 850.
  • With 5 questions and predictions: try 1000–1100.

When WordPress removes the iframe

If the post looks fine in the editor but the simulation is missing after you save, something stripped the iframe. The usual causes:

  • Your user role. WordPress removes iframes and scripts from users who are not allowed to post unfiltered HTML. On multisite networks, often only the network's super admin can. Ask an administrator to paste the code for you, or use method A.
  • A security plugin or page builder that filters HTML. Check its settings for iframes or embeds, or ask whoever manages the site.
  • A hosted plan that limits custom code. Some hosted WordPress plans do not allow iframes or scripts in posts.

If only the script is removed, the simulation still works. Just raise the height as above.

Teaching blog ideas that work

A simulation turns a post from something students read into something they test. Some formats that work:

  • Problem of the week. One question, one simulation, answers collected on the link.
  • Revision page per unit. Three or four simulations, each with a one-line task.
  • Flipped lesson. A short explanation, a simulation with prediction questions, then "bring your answer to class".
  • Explainer for parents. "This is what we did in class today", with the same simulation students used.

Here is a problem-of-the-week post in action, using the Galton board simulation:

Galton board – Plinko probability

On the Intro screen, balls drop through 12 rows of pegs and bounce right with probability 0.5 at each peg. Ask readers to predict which bin gets the most balls before they press Drop 100 balls. Theory says the middle bin (k = 6) gets about 22.6% of the balls, the three middle bins together about 61%, and each end bin only about 0.02%, roughly 1 ball in 4,096. On the Lab screen, set p = 0.7: the peak moves to about k = 8.4, the mean of 12 × 0.7.

Questions for the link (build them on the Questions tab of the Share page):

  • Prediction (not scored): "Which bin will collect the most balls?" Expected answer: the middle one, k = 6.
  • Number: "About what percentage of balls land in bin 6?" Answer 22.6, tolerance ± 1.5, unit %.
  • Short text: "Why do so few balls reach the end bins?" Sample answer: a ball must bounce the same way at all 12 pegs, and only one path in 4,096 does that.

Ask students for a nickname or first name only. You see answers on the link card and can download them as CSV. For a full walkthrough, read collect student answers without student accounts. For ideas beyond probability, see interactive math activities.

Troubleshooting

The frame is blank

Open the play link directly. If it fails only on school devices, a web filter is blocking simulic.com. If it works directly, check the post's HTML: if the <iframe> line is gone, see the section on removed iframes above.

"This Simulic link is no longer available" means the link is turned off: click Turn on link on the Share page. "This Simulic link has expired" means a last day was set in the Pro Options; change or clear it.

The simulation is cut off at the bottom

Raise height in the Custom HTML block, or switch from method A to method B.

For other platforms, see the guide to embedding a simulation in your LMS and the in-app embed help page.

FAQ

Does the embedded simulation set cookies on my WordPress site?

No. The embed sets no cookies, and it keeps working when browsers block third-party cookies.

Can readers without an account use the simulation?

Yes. Nobody needs an account to play a simulation. If you attach questions, readers type a nickname to answer.

Automatic embeds depend on the site's WordPress setup, plugins and editor. When the link stays plain, use a Custom HTML block.

Can I embed the same simulation in several posts?

Yes. Create one link per post so play counts and answers stay separate.

Will the embed break if I change the question set later?

No. The embed code stays the same. Changes you make on the Share page show up in the post automatically.