Publish targeted GymCore content

Publish targeted GymCore content.

Status: source-reviewed Section: Reference

Search documentation

Type to search.

Site owners can use one editor block and nine shortcodes to place member-specific content on WordPress pages. A shortcode is text in square brackets that WordPress replaces when the page loads; it is not a privacy boundary by itself.

Targeted Content block

Insert Targeted Content from the block inserter. The registered block name is `gym/targeted-content`.

Editor control Block attribute Default Meaning
Program `program` Blank Restricts content to the matching program
Minimum belt `minBelt` Blank Sets the lowest eligible belt
Location `location` Blank Restricts content to a location
Members only `membersOnly` Off Requires the member check
Foundations only `foundationsOnly` Off Requires Foundations eligibility
Logged-in only `loggedIn` Off Hides primary content from signed-out visitors
Minimum classes `minClasses` 0 Requires at least this many classes
Minimum streak `minStreak` 0 Requires at least this streak
Fallback `fallback` Blank Content shown when the visitor does not qualify

Block filtering depends on the current user’s GymCore profile and the installed runtime that renders the block. Previewing as an administrator is not a substitute for testing the intended member state.

Shortcode catalogue

Shortcode Accepted attributes and defaults Output and dependencies
`[gym_targeted]` `program=“”`, `min_belt=“”`, `max_belt=“”`, `min_classes=“”`, `min_streak=“”`, `foundations_only=“”`, `members_only=“”`, `logged_in=“”`, `role=“”`, `location=“”`, `fallback=“”` Shows enclosed content when the current visitor matches; `[gym_targeted_content]` is an alias
`[gym_member_greeting]` None Signed-in members see their display name, rank, classes, and streak; guests see a generic welcome
`[gym_progress_card]` None Shows current-member progress; guests receive a join call to action
`[gym_pause_membership]` None Renders the membership-pause flow; the active membership and pause services must be available
`[gym_member_badges]` `user_id=“0”`; 0 means current user Renders a member’s badges. Supplying another user’s ID can expose their achievements, so do not use it on a public page
`[gym_wall_of_champions]` None Renders the registered achievement wall
`[gym_referral_leaderboard]` `limit=“10”`; clamped to 1–50 Shows display names and referral counts; treat it as public member recognition
`[gym_referral_code]` None Shows the signed-in member’s referral code
`[gym_technique_videos]` `program=“”`, `belt=“”`, `per_page=“12”` clamped to 1–48, `title=“Technique Videos”` Requires login and an active membership; output also depends on published Technique Video records and available video delivery

Exact steps

Safe stop: Use Preview and test accounts before Update or Publish; publishing is the first step that can expose targeted or fallback content to visitors.

  1. Open Pages, select the page, and choose Edit.

  2. For visual targeting, select Add block (+), search for Targeted Content, and insert it. For a shortcode, insert a Shortcode block and enter the exact shortcode.

    Expected: The editor shows the Targeted Content controls or the literal shortcode inside a Shortcode block.

  3. Enter the primary content and an explicit fallback when a visitor could fail the targeting rules.

    Expected: The editor retains both branches before publication.

  4. Select Update or Publish.

    Expected: WordPress confirms the page was updated or published.

  5. Open the page signed out, then with test accounts representing every intended program, belt, location, and membership state.

    Expected: Each account sees only its intended branch. Confirm the member profile, membership, badge, referral, or video record in GymCore when output differs; do not infer a record from a cached page.

Symptoms and source checks

  • Literal shortcode text means the registering plugin or module did not load, or the content was not placed in a Shortcode-aware area.
  • Empty targeted content usually means the current user’s source profile does not match and no fallback was supplied.
  • Empty video output can mean no matching published Technique Video record, no active membership, or unavailable VideoPress/runtime delivery.
  • Cached pages can show one member’s branch to another visitor. Exclude personalized pages from shared full-page caches.

Verified against: current block registration, shortcode registration, attribute defaults, and render callbacks in the checked-out GymCore source.

Need help?

Describe one problem and the installed versions. Never send passwords, license keys, API keys, payment details, or member records.

Contact GymCore