Docs
WordPress plugin

Blocks and shortcodes

Every setting of the Agoo booking and pre-registration blocks and shortcodes, with examples for a church and a clinic.

Planned· P9For site owners and WordPress developers

This is designed and scheduled but not built yet. We document it now so you can plan your integration.

The plugin gives you each widget two ways: as a block for the block editor, and as a shortcode for classic themes, page builders and widget areas. Both produce the same result. You need a publishable key saved in Settings → Agoo first; see install and connect.

Agoo booking

Shows the available times for one of your booking types and takes the booking. Agoo sends the confirmation and reminders by SMS, WhatsApp or email, and in-person bookings arrive as expected visitors with a QR pass.

Block

Add the Agoo booking block (agoo/booking) and set it up in the block sidebar.

Prop

Type

The block supports wide and full alignment.

Shortcode

Shortcode
[agoo_booking type="btype_01jv4dk79q9g8xe6szaeavsntc"]
AttributeBlock equivalentValue
typebookingTypebtype_…. Required.
datedateYYYY-MM-DD
themethemelight, dark or auto. Default light.
colorprimaryColorHex colour, such as #0b5d4b
prefill_userprefillUseryes or no. Default no.

Agoo pre-registration

Lets visitors register before they arrive at one of your sites: their details, who they're visiting, and the questions your organisation asks for that visitor type. They get a QR pass, and if your organisation requires host approval, the host approves first.

The form offers only the visitor types an admin has opened for pre-registration in Console → Settings → Forms, and asks only the questions asked of the visitor, never the fields your staff fill in.

Block

Add the Agoo pre-registration block (agoo/preregistration).

Prop

Type

Shortcode

Shortcode
[agoo_preregister site="site_01kjpt3yw0fz0v414608h9x65s"]
AttributeBlock equivalentValue
sitesitesite_…. Required.
visitor_typevisitorTypeA visit type key open for pre-registration, such as meeting, event or parent_pickup
hosthostperson_…
themethemelight, dark or auto. Default light.
colorprimaryColorHex colour
prefill_userprefillUseryes or no. Default no.

What the plugin outputs

Both forms print a placeholder element and load the embed script once, only on pages that contain a widget:

Rendered HTML
<div class="wp-block-agoo-booking" data-agoo-booking="btype_01jv4dk79q9g8xe6szaeavsntc" data-agoo-key="agoo_pk_live_…" data-agoo-theme="light"></div>
<script src="https://js.agoo.ardent.africa/v1/embed.js" defer></script>

You can change the attributes before they're printed with the agoo_embed_attributes filter, and listen for the widget's browser events, such as agoo:booked, in your theme's JavaScript.

If an attribute is wrong (for example a mistyped ID), visitors see a short "This form isn't available" message, and logged-in editors see the reason.

Example: a church's "Plan your visit" page

Grace Chapel International wants first-time guests to register before Sunday service, so ushers can welcome them by name and the follow-up team can send a thank-you on WhatsApp.

In Agoo

The admin adds a First-time guest visitor type in Console → Settings → Forms, with the key first_time_guest and the questions they want: how the guest heard about the church, whether they're bringing children, and consent to a follow-up message. They turn on Pre-registration for the type, and mark the ushers' own field, "Welcomed by", as staff only, so guests never see it. The type uses one of the church's custom forms.

In WordPress

Create a page called "Plan your visit". Add a paragraph with service times and directions, then the Agoo pre-registration block with:

  • Site: the church's main site
  • Visitor type: First-time guest
  • Theme: Auto

Or, in a classic theme:

Shortcode
[agoo_preregister site="site_01knvdere0f738bjjhnyhtyv2z" visitor_type="first_time_guest" theme="auto"]

On Sunday

Guests who registered get their QR pass by SMS or WhatsApp. At the door, ushers scan the pass or find the guest by name, and the first-timer list is ready for the follow-up team.

Example: a clinic's booking page

Akwaaba Clinic has a page for each service and wants patients to book from each one.

In Agoo

The admin creates a booking type per service, such as "General consultation" (30 minutes) and "Antenatal check" (45 minutes), each with its doctors' availability and intake questions. Clinical details stay out of Agoo: the intake questions ask only what reception needs.

In WordPress

On the "General consultation" page, add the Agoo booking block and choose the "General consultation" booking type. Set Primary colour to the clinic's green.

Shortcode
[agoo_booking type="btype_01jpm5q1nxw1rnj47e65gh2bh8" color="#0b5d4b"]

For patients with an account on the clinic's site, turn on Prefill user so their name and email are already filled in.

After booking

The patient gets a confirmation by SMS with a reminder the day before. Reception sees the booking as an expected visit on the day, and the patient checks in at the kiosk.

Prefill and page caching

With Prefill user on, the page contains the logged-in user's name and email. The plugin marks those pages as not cacheable for logged-in users, and most caching plugins and hosts don't cache pages for logged-in users anyway. If your cache does, leave prefill off, or one user's details could be shown to another.

On this page