Integrations: WordPress plugin
If your church site runs on WordPress you may not need to write any code. The Lectern plugin reads the same API described in these guides and shows the library on your site.
What the plugin does#
- A sermon library at an address you choose, such as
/sermons/, with series, speakers, dates, search and pagination. - A page for every sermon with the approved notes, Scripture references that jump to the moment they were spoken, a searchable transcript with timestamps, a video or audio player, and share buttons.
- Blocks (Sermon Library, Latest Sermons, Sermon Series, Ask Widget) and shortcodes (
[lectern_sermons],[lectern_latest],[lectern_series],[lectern_ask]) for page builders. - The Lectern Ask widget, with page rules and an option to load it only after the visitor consents.
- Search engine support: schema.org markup, Open Graph and Twitter tags, canonical addresses, a WordPress sitemap provider, and a noindex switch. It works with Yoast SEO and Rank Math.
- Instant updates through a signed webhook, a cache you can purge, and a saved copy that keeps the library up when Lectern is unreachable.
Only material your team has approved in Lectern is ever shown, because the plugin reads through the API like any other integration.
Install#
- Upload the plugin folder to
/wp-content/plugins/, or install the zip under Plugins, Add New, Upload. - Activate Lectern.
- Go to Settings, Lectern. Enter your Lectern address, your church’s slug, and an API key, then press Test connection.
- Under Sermon library, press Create a Sermons page for me, or choose an existing page. Use any permalink setting except Plain.
- Optional: enter the widget key to show the Ask button, and add a webhook in Lectern for instant updates.
The key it needs#
| Scope | Why |
|---|---|
teachings:read | Sermons, series, speakers, search and transcripts. |
notes:read | Approved notes. |
scripture:read | Scripture references. |
Keys that can add teachings or generate notes can also see drafts that are not approved. Create a key with just the three scopes above for the plugin. Test connection warns you if the key can see drafts.
The plugin keeps the key encrypted on your server and never sends it to a visitor’s browser. You can also set LECTERN_API_KEY and LECTERN_WEBHOOK_SECRET in wp-config.php to keep secrets out of the database.
Instant updates with a webhook#
In Lectern, add a webhook that points at the address the plugin shows on its settings screen, subscribed to teaching.ready, note.approved and scripture.detected. Paste the signing secret into the plugin. The plugin verifies every delivery with the scheme in Webhooks and accepts a second secret while you rotate.
For developers#
The plugin exposes filters and an action, including lectern_widget_enabled, lectern_template, lectern_schema, lectern_seo_tags, lectern_http_timeout and the lectern_webhook_received action. You can copy any file from the plugin’s templates folder into a lectern/ folder in your theme to change the markup.
The plugin is a working example of a read-only integration: it calls the API from the server, caches results, verifies webhook signatures and keeps showing the last good copy when the API is unreachable.
Data sent#
Your server calls Lectern with your key. No visitor data is sent, except the words a visitor types into the sermon search box and, if you enable the Ask widget, the questions they type. Turn on the consent option for the widget if you need consent first. Embedded videos load from youtube-nocookie.com or player.vimeo.com in the visitor’s browser, only on pages that have a video.