Add targeted content to a page.
Use the Targeted Content block when editors need visible controls. Use a Shortcode block for GymCore’s other member widgets. Both depend on the current visitor’s source records; they are not a substitute for WordPress access control.
Exact steps
Safe stop: Use WordPress Preview and test every audience branch before Update or Publish; publication can expose protected or fallback content immediately.
-
Open Pages, select the page, and choose Edit.
-
Select Add block (+), search for Targeted Content, and insert it.
Expected: The editor adds a GymCore Targeted Content block with controls for program, belt, location, member/login state, minimum classes, minimum streak, and fallback content.
-
Add the protected message, set only the rules needed for this audience, and enter fallback content for visitors who do not match.
Expected: Both the matching and fallback branches remain visible in the editor.
-
Select Update or Publish.
Expected: WordPress confirms the page was updated or published.
-
Open the page signed out and with test members representing every intended program, belt, location, attendance, and membership state.
Expected: Each visitor sees the correct branch. Confirm unexpected results against that test member’s GymCore profile rather than the administrator preview.
Add a shortcode
-
In the page editor, select Add block (+) and insert a Shortcode block.
-
Enter the exact shortcode, such as `[gym_member_greeting]`, `[gym_progress_card]`, `[gym_referral_code]`, or `[gym_technique_videos]`.
Expected: The editor displays the literal shortcode inside its Shortcode block; the rendered page replaces it with GymCore output.
-
Select Update or Publish, then test the page with the intended visitor state.
Expected: The widget renders from the current member, referral, badge, or video source records. Literal shortcode text on the live page means the registering module did not load or that page area does not process shortcodes.
See the complete block and shortcode catalogue for every registered shortcode, attribute, default, and privacy note.
Privacy and caching
- Do not set `user_id` on `[gym_member_badges]` to another real member on a public page.
- The referral leaderboard exposes display names and referral counts; obtain approval before presenting members publicly.
- Exclude personalized pages from shared full-page caching. A cached member branch can be shown to the wrong visitor.
- Video and membership results depend on the installed runtime and current source records; a successful page update does not prove the member can view the content.
Final source verification
Reopen the page in WordPress and confirm its saved block or shortcode, then compare each rendered member value with the corresponding GymCore user, membership, attendance, referral, badge, or video record.
Verified against: current GymCore block and shortcode registrations and render callbacks.
Need help?
Describe one problem and the installed versions. Never send passwords, license keys, API keys, payment details, or member records.