Let venue owners manage their own listings and deals from the app

Metadata

Field Value
Article type How-to (Admin)
Plugins involved mam-geodirectory, mam-special-offers, mam-gravity-forms-manager
Third-party plugins GeoDirectory 2.x, GeoDir Pricing, GeoDir Claim Manager (for the claim step)
Category Building Your App
Audience WordPress admin
Estimated time 30–45 minutes
Last verified 2026-07-20 (mam-geodirectory 26.29.6, mam-special-offers 26.29.2)

What you’ll build

By the end of this article, a signed-in venue owner can do all of this from inside the app — no WordPress admin login required:

  1. Take ownership of their listing (the Claim Listing flow), or be granted ownership by an admin invite.
  2. Edit the listing’s own details — name, address, hours, phone, website, social links, photo — through the Edit Listing tab bar button.
  3. Add, edit, and remove deals on that listing through the Edit Deals tab bar button.

All three buttons live on a listing’s detail screen, and each one checks the viewer’s role on that specific listing before it shows up. An ordinary app user browsing the same listing sees the consumer-style buttons — Call, Website, Map, Favorite, Share — while the listing’s owner, managers, and staff see the owner toolset instead.

This is the setup most directory-and-deals apps want in production: it turns your app into a self-service portal for the businesses you list — which, if you’re building this kind of app, is probably the whole point.


How the pieces fit together

Three MAM plugins work together to produce the owner journey, and knowing which plugin owns which step makes both the setup and the troubleshooting much easier.

Step Tab bar button Owned by Backed by
Acquire the listing Claim Listing (3-state) mam-geodirectory (+ GeoDir Claim Manager) Claim AJAX flow / claim form
Edit the listing’s details Edit Listing mam-geodirectory One Gravity Form per GD post type
Manage the listing’s deals Edit Deals mam-special-offers Auto-generated “Special Offers: Offers” Gravity Form

All three buttons are mam_main_add_tab_bar_item_* slots owned by mam-main: each plugin subscribes to its own slot and decides whether its button should appear for the current user-and-listing combination. The role logic — is this viewer the owner / manager / staff / admin of this listing? — lives in one place, mam-geodirectory‘s tab bar layer, and mam-special-offers simply defers to it for the deals button.

Both the Edit Listing and Edit Deals flows run on Gravity Forms as their form engine, so mam-gravity-forms-manager must be active for either button to render — without it, the buttons silently return empty.


Prerequisites

  • A working GeoDirectory + MAM directory app. Listings already appear in the app and you can open a listing detail screen. See Plugin: mam-geodirectory and Recipe: Configure the GeoDirectory settings page.
  • These plugins active and entitled: mam-geodirectory, mam-special-offers, mam-gravity-forms-manager.
  • mam-main app-user authentication wired up so mam_user_id() resolves on form submission. The whole journey depends on the app knowing who the signed-in user is.
  • GeoDir Pricing packages defined for your listing post type (needed for the per-package deal cap and for claim pricing).
  • For the claim step only: the third-party GeoDir Claim Manager plugin active.

Step 1 — Decide how owners get their listing

There are two ways a user can become a listing’s owner — pick whichever matches your business model, or support both.

A. Claim flow (self-serve). The user finds their unclaimed listing in the app and taps Claim Listing. Depending on how you’ve configured things, they either request approval first and then pay, or go straight to purchase. On success, GeoDirectory re-points the listing’s post_author to them and applies the chosen package. See Form and flow: Claim Listing for the full state machine and AJAX endpoints.

The Claim Listing button hides itself automatically — when the listing’s already claimed, the viewer’s already the author, no one’s signed in, the post type doesn’t support claiming, or GeoDir Claim Manager isn’t active — so you never have to gate it yourself.

You’ll configure the claim toggles under Mobile App Manager → Geodirectory → Claim Listing — its own tab, alongside Settings and the per-post-type GD tabs:

  • Require approval before purchase, or allow direct purchase.
  • Checkout mode (iap for App Store / Play Store in-app purchase, or stripe).
  • The CTA headline and the bullet-list of features shown on the claim screen.

B. Admin invite (you assign ownership). You invite an owner to claim a listing using the Send Claim Invite meta box on that listing’s WordPress edit screen (enter the owner’s email and tick the checkbox on save to email them a claim invitation), or assign owners/managers/staff directly from WordPress admin. See Recipe: Manage staff and managers (admin).

Either way you end up in the same place: the listing has an owner (its post_author), and possibly managers and staff too. That ownership is exactly what unlocks the Edit Listing and Edit Deals buttons in the next two steps.


Step 2 — Let owners edit their listing details

This is the Edit Listing button: it opens a Gravity Form already filled in with the listing’s current data, and submitting it writes those changes straight back to the GeoDirectory post.

2.1 Build a Gravity Form per post type

For each GeoDirectory post type you want owners to edit from the app, build one Gravity Form, with fields whose admin label or htmlvar_name matches the GD custom fields you want them managing. Common fields include:

  • post_title, post_content
  • address (one field storing a JSON object: Street, City, State, Zip, Country)
  • phone, email, website
  • business_hours (one field storing JSON per day of week)
  • One field per social platform (facebook, instagram, …)
  • post_images (image upload; the first image becomes the listing’s featured_image)
  • postid (hidden — pre-filled with the listing ID when editing)
  • delete (checkbox — sends Yes to remove the listing; only added when the post type’s Editor can delete listing option is on)

When the form opens, the plugin maps the listing’s data onto these fields for you automatically — including the special JSON handling for address, business_hours, and categories. See Form: Add/Edit Listing for the exact mapping table.

2.2 Wire the form and field visibility

Head to Mobile App Manager → Geodirectory → GD {Post type} and pick your Gravity Form for Add or Edit Listing Form, then save.

On that same tab, use the field visibility manager to untick any fields you’d rather not expose in the app — hidden fields simply aren’t sent to the form. Save.

2.3 Turn on author editing

Go to Settings → Author can edit listing on app? and set it to yes — this is the master switch, and without it the Edit Listing button never appears no matter how well the form is configured. (The button needs both the per-post-type form and this toggle.)

2.4 How submissions are saved

When the owner submits, the handler first verifies they’re signed in, then creates or updates the GD post and writes each custom field through GeoDirectory’s own save path. What status the new post gets depends on your configuration:

  • pending when the post type’s “add in draft” option is on,
  • publish for administrators,
  • trash when the delete flag is Yes.

A successful save triggers a refresh, so the app re-fetches the listing right away.


Step 3 — Let owners manage their deals

This is the Edit Deals button, owned by mam-special-offers. Unlike the listing form, you don’t build this one by hand: the plugin auto-generates a Gravity Form named Special Offers: Offers the first time both mam-special-offers and mam-gravity-forms-manager have loaded.

3.1 Confirm the offers form was generated

Once both plugins have loaded for the first time, you should find the form under Forms → Forms in WP admin, titled Special Offers: Offers. If it isn’t there, work through this checklist:

  • Confirm both plugins are active and entitled.
  • Visit an admin page that triggers the suite’s settings registration (e.g. Mobile App Manager → App Settings).
  • Check the option that stores the generated form ID for a non-zero value:
$form_id = get_option( 'mam_special_offers_special_offers' );

If the option holds an ID but no form actually exists, the Gravity Forms builder failed silently behind the scenes — so debug mam-gravity-forms-manager itself, not the offers plugin.

3.2 What the owner sees and does

When a venue owner opens their listing and taps the Edit Deals button (a gift icon, by default), they land on a list with one row per existing offer plus an Add Offer row at the bottom. From there they can:

  • Add a deal — opens the auto-generated form with the listing ID pre-filled; submitting creates a new offer.
  • Edit a deal — tapping an existing offer opens the same form pre-filled with that offer’s current values; submitting updates it in place.
  • Remove a deal — ticking the Delete Offer checkbox before submitting moves the offer to draft, hiding it from future loads.

The form’s fields — title, subtitle, description, an “always available” toggle, start and end dates — are all generated automatically, including the conditional logic that hides the date fields once “always available” is switched on.

3.3 Set the per-package deal cap

The number of deals an owner can add is capped — 20 by default, though mam-geodirectory can override that per listing based on its pricing package. Set no_of_deals_included on each GeoDir Pricing package to control it (see Recipe: Pricing package fields). Owners on a package with a lower allowance hit a lower cap, and once they’re at it, the Add Offer row simply disappears — existing offers still show up in the list.

Setting no_of_deals_included to 0 on a package means no deals allowed — that’s different from leaving it empty, which falls back to the upstream default. Worth watching for when you’re configuring packages.


Step 4 — Confirm the role gating

This is the part that keeps the whole journey safe: each owner should only ever be able to manage their own listing. Most of it is handled for you already, but it’s worth understanding — and verifying.

Listing and consumer buttons swap by role. When the viewer is the owner, manager, staff, or admin of a listing, mam-geodirectory skips the consumer-style buttons (Call, Website, Map, Favorite, Share, Chat) and shows the owner toolset instead (Edit Listing, Edit Staff, Send Notification, Edit Deals). Ordinary viewers see the reverse.

Edit Deals is hidden from non-owners automatically. mam-geodirectory answers the special-offers “hard skip” hook: if the viewer isn’t owner, manager, admin, or staff on that listing, the Edit Deals button gets hard-skipped before mam-special-offers even builds it — so a random app user never sees another venue’s deal editor.

Ownership is enforced in two places. Beyond the tab bar gating that hides the button from the wrong users, the special-offers submission handler independently checks ownership again on save: it rejects the submission with Permission denied unless the signed-in app user can edit the offer being updated (or the parent listing, when they’re creating a new one). So even a hand-crafted submission from a non-owner gets refused, not just hidden. If you want to lock things down further, layer your own logic onto the tab bar filter (see Recipe: Let venue owners manage offers from the app and Hook: mam_special_offers_skip_tab_bar_button).


Step 5 — Verify the full journey in the app

Walk through the whole journey as three different users:

  1. As an anonymous or ordinary user — open a listing. You should see consumer buttons only: Call, Website, Map, Favorite, Share — no Edit Listing, no Edit Deals. If the listing is claimable and still unclaimed, you should also see Claim Listing.
  2. Run the claim flow — claim a listing (or request, get approved, then pay for one). Confirm the listing’s author becomes your test user and the app starts reporting it as claimed.
  3. As the now-owner — reopen the listing:
    • Edit Listing appears — tap it to open the pre-filled form, and a saved change refreshes the listing.
    • Edit Deals appears — Add Offer creates a deal, editing an existing one updates it, and Delete Offer hides it.
    • The deal cap matches the listing’s package allowance.

If a button’s missing, work backward through its owning plugin’s checklist:

  • No Edit Listing → the per-post-type form isn’t wired, or “Author can edit on app” is off, or the viewer isn’t actually the owner.
  • No Edit Deals → the offers Gravity Form wasn’t generated (Step 3.1), or the viewer isn’t owner/staff, or the listing is already at its deal cap.
  • No Claim Listing → GeoDir Claim Manager isn’t active, the listing is already claimed, the post type doesn’t support claiming, or the viewer is already the author.

Common gotchas

  • Both form-driven buttons need Gravity Forms. If mam-gravity-forms-manager is inactive, Edit Listing and Edit Deals both quietly come back empty — with no warning in wp-admin to tell you why.
  • Caps are silent. When an owner hits the deal cap (or the staff / push-notification quotas on the same screen), the relevant button or “Add” row just disappears, with no explanation shown. Worth mentioning these limits in your in-app onboarding, so owners aren’t left guessing — and you aren’t left fielding support tickets about it.
  • The deal editor has no image field. Re-saving an offer through the in-app form won’t change — or clear — its thumbnail. If owners need to set offer images from the app, the offers form will need to be extended in code.
  • Listing edits may go to a moderation queue. If you’ve set the post type to “add in draft,” owner edits land as pending for non-admins. Decide whether you want owner edits to publish right away or go through review, then set that toggle to match.
  • Radius override for nearby deals is global. The setting that widens the nearby-offers radius for GD listings affects every special offer in the system — not just the GeoDirectory-parented ones.

Verification

This draft was assembled against:

  • Plugin: mam-geodirectory v26.29.6 — includes/mam_gd_tab_bar_buttons.php, includes/forms/gd-add-edit-listing-manager.php, includes/mam_gd_claim_listing_manager.php, includes/mam_gd_special_offer_settings.php
  • Plugin: mam-special-offers v26.29.2 — includes/mam_special_offers_form_manager.php, includes/mam_special_offers_tab_bar_manager.php
  • Plugin: mam-gravity-forms-manager (required for both form flows)
  • Third-party: GeoDirectory 2.x, GeoDir Pricing, GeoDir Claim Manager

Re-verify whenever the listing tab bar button gating changes, the Add/Edit Listing field mapping or post-status logic changes, the auto-generated offers form’s field slugs or option key (mam_special_offers_*) change, the default 20-offer cap or no_of_deals_included package key changes, or the claim button state machine changes.


  • Plugin: mam-geodirectory
  • Plugin: mam-special-offers
  • Recipe: Configure the GeoDirectory settings page
  • Form: Add/Edit Listing
  • Form and flow: Claim Listing
  • Recipe: Manage staff and managers (admin)
  • Recipe: Let venue owners manage offers from the app
  • Listing tab bar buttons
  • Integration: Special Offers
  • Recipe: Pricing package fields
  • Hook: mam_special_offers_skip_tab_bar_button
  • Hook: mam_special_offers_deals_allowed
Was this article helpful?
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!