Goal
Assign WordPress users as managers or staff for a GeoDirectory listing from the WordPress admin, without going through the in-app Add Users form. Useful for bulk onboarding, fixing up a corrupted invite, or seeding test data.
After this recipe the chosen users appear as members of the listing’s chat group, see the listing’s owner-only tab bar buttons in the app, can send push notifications (managers only) within the package’s quota, and bypass any IAP gates configured for owner/staff bypass.
Prerequisites
- WordPress admin with capability to edit the listing’s post type.
- GeoDirectory active.
- The
mam-chat-managerplugin active (the Staff & Managers system uses its group-membership filters:mam_get_group_members_for_post_id,mam_invite_app_user_to_post_id, etc.). - Each prospective manager/staff has a WordPress account and an associated MAM app-user record (the system relies on
mam_get_user_post_idto map WP users to app users).
Where to find the meta box
Open any GeoDirectory listing in WordPress admin (typically GD Place → All Posts → Edit). The plugin registers two meta boxes on every GD post type except gd_event:
- Staff & Managers (normal position, high priority) — visible to anyone who can edit the post.
- Send Claim Invite (sidebar, high priority) — visible only to administrators. See Recipe: Bulk-invite venue owners for the bulk version of this.
The Staff & Managers meta box renders two Select2-powered multi-selects:
- Managers — the listing’s elevated members. Owners (the post author) are excluded from this list since ownership is tracked via
post_author, not the invite system. - Staff — the listing’s regular staff members. Members shown here are mutually exclusive with Managers (staff members already in Managers are stripped on save).
Each option searches WordPress users via the geodir_json_search_users AJAX action provided by GeoDirectory.
Steps
1. Search for users
Click into the Managers field. Type a partial display name or email. Pick the user. Repeat to add multiple. Do the same for Staff.
2. Save the post
Click Update. The plugin’s save_staff_members() hook (registered on save_post_{post_type} for every GD post type except gd_event) verifies the meta box’s nonce, then uses these mam-chat-manager filters to apply the changes:
mam_reset_group_members_for_post_id_and_role— clears the previous Managers and Staff lists.mam_invite_app_user_to_post_id— adds each selection back as an accepted invite.
The plugin also fires mam_gd_staff_member_accepted (via the chat-manager pipeline) for every newly-added member, which prompts this plugin to enrol them in the listing’s chat group automatically (on_staff_member_accepted() in mam-geodirectory.php). Removed members trigger mam_gd_staff_member_removed and are de-enrolled.
3. Verify
- Open the mobile app as one of the new managers. The Edit Listing, Edit Staff, Edit Events, and Send Notification tab bar buttons should now appear on the listing’s detail screen.
- Open the app as a new staff member. The Edit Staff button (and other owner-only buttons) should be hidden, but Favorites/Phone/Map/Email/Share are also hidden — staff see the listing as “their” venue and the action set switches accordingly.
- In the WordPress admin, refresh the listing’s edit screen. The newly-saved members should reappear in the multi-selects.
- Open the listing’s chat group in the chat manager. The new members should appear there.
Notes and gotchas
- Owner is implicit. The post author is treated as a manager throughout the runtime (
get_manager_or_staff_for_location()always re-adds them unless they are an administrator). Adding the author into the Managers select does nothing harmful but is unnecessary. - Administrators are filtered out of “managers.” When the post author is an admin, no implicit owner-as-manager fallback applies — admins use their global admin role instead.
- Pending invites are not shown. The meta box only displays accepted group members. An invite that the recipient has not yet accepted will not appear here; check the Send Claim Invite meta box or the in-app Manage Invites form.
- Removing a user does not delete their WordPress account — only the listing-scoped membership.
Verification
This article was last verified against:
- Plugin:
mam-geodirectoryv2.1.5 - Source:
includes/mam_gd_staff_manager.php - Source:
mam-geodirectory.php—on_staff_member_accepted()/on_staff_member_removed()
Re-verify whenever the chat-manager filter contracts change, the Select2 markup is replaced, or the gd_event exclusion in add_meta_boxes() changes.
Related articles
- Plugin: mam-geodirectory
- Form: Add or remove staff and managers
- Form: Manage staff invitation
- Listing tab bar buttons
- Integration: Chat Manager
- Recipe: Bulk-invite venue owners
Metadata
| Field | Value |
|---|---|
| Article type | Recipe (Admin) |
| Plugin slug | mam-geodirectory |
| Applies to plugin version | 2.1.5+ |
| Category | Building Your App |
| Audience | WordPress admin |
| Estimated time | 5 minutes |
| Last verified | 2026-05-01 |
