Embed a survey with the shortcode
The shortcode drops a survey into a regular post, page or widget — wherever WordPress renders shortcodes — instead of sending people to the survey's own page. Use it when the survey needs to live inside content you already have, like a blog post or a sidebar.
Prerequisites
- The survey's numeric ID, shown in the ID column of the SurveyX dashboard.
Steps
- Copy the shortcode. On the dashboard, click the code-brackets icon in the survey's Embed
column while the survey is Active — one click copies
[surveyx id="X"]to your clipboard; double-clicking opens a dialog with the same code. Or write it yourself with the syntax below. - Paste it into a Shortcode block or a Paragraph block in the block editor, into a Classic Editor post or page, or into a text widget — any WordPress content area that runs shortcodes.
- Add
size="xs","s","m","l"or"xl"after the id if you want a size other than the default.
[surveyx id="123" size="l"]

Attributes
| Attribute | What it does | Required | Default | Values |
|---|---|---|---|---|
id | Which survey to render | Yes | — | The survey's numeric ID |
size | Rendered width preset | No | l | xs, s, m, l, xl — anything else silently falls back to l |
There is no theme attribute. A survey's theme comes from its own settings, not from the
shortcode.
What respondents see
The survey renders inline, in your page's own layout and surrounding content — there's no separate page, and no page-level title, description or social-preview tags the way the standalone survey page has. The cover always uses the Stacked layout here, even if you picked Image left, Image right or Full screen for the survey — those three only show up on the survey's own page. See Set your survey's title and cover.
Troubleshooting
Nothing appears at all — just blank space. The most common cause is a missing id. A bare
[surveyx] renders nothing to a regular visitor. If you're logged in as an administrator, you'll
see an inline notice instead ("Survey ID Missing"), which is a hint the shortcode itself is fine
but the id attribute isn't set.
The shortcode shows up as literal text, [surveyx id="123"], instead of the survey. This is
WordPress deciding not to run the shortcode, not a SurveyX error. Two common causes: you pasted it
into a block that doesn't execute shortcodes, such as a Custom HTML or Code block — move it to a
Shortcode or Paragraph block instead — or your editor auto-converted the straight quotes around the
id into curly ones, which breaks the attribute — retype the quotes as plain " characters.
An admin sees a "Survey ID Missing" or "Survey Not Found" notice, but other visitors see nothing at all. That's by design — only administrators get the inline explanation; everyone else sees an empty result so a broken shortcode doesn't show raw error text on a live page.
On Pro, the embed is blank for everyone, including admins. Check that your Pro licence is active. An inactive or expired licence makes the shortcode render nothing at all, silently, for every visitor.