While full-page redirects work great for beefy forms, shortcodes offer the flexibility toโฆ
Gate content in tricky spots like sidebars, footers, or directly inside your favorite page builder like Elementor.
Wrap your content with shortcodes, so you can keep designing in Elementor without interruptions.
Gate entire pages, posts, or specific sections like a video, ebook, or download button.
Instantly reveal content after submitting the formโno redirects, no reloads.
Understanding the
Access to this content requires submission of a form.
tags create the gate. Any content between them stays gated.
required_form_ids=โ1โ tells the gate which form unlocks it. Change 1 to your formโs actual ID.
Itโs also possible to tweak how the gate behaves using a few handy parameters we can add inside the shortcode. For example:
requires_access_message lets you show a message before someone fills out the form. Want to put your form right in the middle of the message? Just drop the {form} merge tag wherever youโd like it to appear.
fallback_behavior decides what happens if someone hasn’t filled out the form yet. Use show_message to show your message, or hide to hide everything until they submit.
Example:
[gpsa required_form_ids="1" requires_access_message="Fill out form to unlock! {form}" fallback_behavior="show_message"] Put content here. [/gpsa]
In this example, visitors see the message with the form embedded right where the {form} is placed. The fallback_behavior=โshow_messageโ makes sure the message shows up first.
Edit post or page with Elementor โบ drag a Shortcode widget into the layout.
Paste the
Access to this content requires submission of a form.
shortcode โบ replace 1 with the form ID.
Add the text or HTML content between the
Access to this content requires submission of a form.
tags.
Save the page.
Now the content stays hidden until visitors submit the form.
Method 2 โ Gating Elementor Posts, Pages, and Templates
While method 1 works perfectly for simple texts and HTML, what if you want to gate an entire post, page, or template built in Elementor?
Say, a styled container with a video player, or even a full page template.
Since we canโt wrap this type of content directly in Elementor, we instead use a โnestingโ trick: grab the contentโs ID, turn it into a shortcode, and nest it inside the
Access to this content requires submission of a form.
tags.
Wizard’s Note
This method gets the job done, but weโll be the first to admit it feels a bit like a patchwork spell. It requires a third-party plugin and some manual copy-pasting that we know isn’t ideal.
So if youโre thinking, โThere has to be a better way,โ there absolutely could beโwe just need you to say the word! ๐งโโ๏ธ
Get Elementor Content ID
Since Elementor doesn’t have a built-in way to grab IDs, we’ll need to grab them manually.
For Posts or Pages:
Edit the post or page with Elementor.
Look at the browserโs URL bar and find the ID number after post=. Example: post=123 means the ID is 123.
For Widgets or Sections:
Weโll need to turn widgets or entire sections into a template first, then grab its ID.
In the post or page youโre editing, right-click the container where the widget or section is โบ select Save as a Template.
In the WordPress dashboard, just below Elementor โบ click Templates โบ Saved Templates.
Edit the template with Elementor.
Look at the browserโs URL bar and find the ID number after post=. Example: post=149 means the templateโs ID is 149.
Build the Elementor Shortcode
Wizard’s Note
Elementor doesn’t natively support shortcodes for its content, so we’ll need a third-party plugin to build them.
For this guide, we’ll be using the free Dynific Addons for Elementor, but feel free to use whatever plugin works for you.
In the WordPress dashboard, navigate to Plugins โบ Add New.
Build the shortcode using Dynificโs shortcode [INSERT_ELEMENTOR] plus the ID you grabbed from the URL: [INSERT_ELEMENTOR id=โ149โ] โ replace 149 with the content ID.
[INSERT_ELEMENTOR] simply displays the Elementor content you want to gate.
Copy shortcode to your clipboard.
Add Elementor Shortcode inside the
Access to this content requires submission of a form.
Shortcode
Edit post or page with Elementor โบ drag a Shortcode widget into the layout.
Paste the
Access to this content requires submission of a form.
And thatโs it! When visitors see your form, they fill it out, submit, and the Elementor content unlocks instantly.
Wand a Better Way? ๐ช
If you think itโd be awesome to have this built directly into GP Submit to Access, drop a comment below. If enough wizards ask for it, we might just brew it up! ๐ง
I would love to see additional Elementor support – maybe a full-fledged Elementor widget that allows styling for a form, with the option to hide a page or Elementor Template behind a gate. (On some sites, I install Essential Add-ons for Elementor for the sole purpose of Gravity Forms styling, so it would be nice to avoid that!)
Hey Travis, great suggestion! Thatโs definitely an interesting idea. Weโll reach out via support to learn a bit more about your setup and how youโre using Elementor with Gravity Forms.
I would love to see additional Elementor support – maybe a full-fledged Elementor widget that allows styling for a form, with the option to hide a page or Elementor Template behind a gate. (On some sites, I install Essential Add-ons for Elementor for the sole purpose of Gravity Forms styling, so it would be nice to avoid that!)
Hey Travis, great suggestion! Thatโs definitely an interesting idea. Weโll reach out via support to learn a bit more about your setup and how youโre using Elementor with Gravity Forms.