Skip to content
memberarea memberarea.io

Using memberarea with page builders and the classic editor

Shortcodes for Elementor, Divi and the classic editor, and what to know about locking a page you did not build with blocks.

In this article

You do not need the block editor to use the plugin. Every block has a shortcode twin, and the access rules are enforced on the server, before the page is sent.

Shortcodes anywhere

Wherever WordPress runs shortcodes, the memberarea ones work: the classic editor, a shortcode widget in Elementor, a Code or Text module in Divi, an HTML module in Beaver Builder, and template files through do_shortcode().

There are eight of them, one per block: [memberarea_checkout], [memberarea_product], [memberarea_cart], [memberarea_badge], [memberarea_login], [memberarea_my_courses], [memberarea_progress] and [memberarea_course_catalogue]. Every attribute, with its values and defaults, is listed in the Blocks and shortcodes reference.

  • product, badge and course take the ID of that item, which you copy from your memberarea.
  • The class attribute puts your own class on the wrapper, which is how you make a block match a builder's styling.
  • Put each shortcode on its own line. Only the checkout button also works in the middle of a sentence.
A shortcode for the course catalogue with two attributes, placed in a Shortcode block
A shortcode for the course catalogue with two attributes, placed in a Shortcode block

Locking a page you built with a builder

The panel that sets a rule lives in the block editor, but the rule itself is stored on the page and checked on every request. So you can set it once in the block editor and keep editing the page in your builder afterwards: the lock stays.

What happens to a visitor without access depends on the answer you picked:

  • Are sent to the sign-in happens before the page is rendered, so it works whatever draws the page. It applies to visitors who are not signed in, once member login is set up. A signed-in member without the course gets the short message instead.
  • Are sent to another page also happens before the page is rendered, for everybody the rule refuses. When the target is not a valid page on this site, or when the memberarea cannot be asked at that moment, the visitor gets the short message instead.
  • See a short message instead swaps the message into the page content. It is applied through WordPress's standard content filter (the_content), late enough to replace what a builder put there.

A builder that passes the page through that content filter is covered by all three answers. A builder or theme template that draws the content its own way, without that filter, is not covered by the message, and the visitor then sees the page.

Warning

Test every locked builder page once in a private window, and once more signed in as a member who does not hold the course. If the content still shows, that builder bypasses the content filter. Switch the page to Are sent to another page, and keep in mind that a member whose access cannot be checked at that moment gets the message instead of the redirect, and such a builder then shows the page.

What is always covered

Whatever built the page, the plugin also guards the places content leaks out of: excerpts, archive and search listings, query loops, comments, the WordPress sitemap and the REST API. A locked page cannot be read through /wp-json either.

What needs blocks

Two things have no shortcode, because they are properties of a block rather than something you place:

  • Block-level visibility, which shows a single block only to signed-in members, only to visitors who are not signed in, or only to holders of a course, a group or a product.
  • Setting up a page rule, as described above.

If you work in a builder most of the time, the practical route is to switch a page to the block editor for a minute, set the rule, and go back.

Caching

Nothing changes for builders: pages stay cacheable for anonymous visitors, and responses for signed-in members are marked not to be cached. If your builder ships its own cache, check that it honours DONOTCACHEPAGE before you rely on a locked page.

Elementor's Element Caching can also cache single widgets. For any widget that holds a memberarea shortcode, leave the widget's "Cache Settings" on the Advanced tab at their default, and never set them to "Active". An active element cache stores the output once and shows one member's name or courses to everybody.

Last updated on October 25, 2026

Was this article helpful?

Related articles