Putting the sermon search on another page
One script tag and one empty div. No build step, no framework, and no iframe — paste this into a Church Co code block and the search appears where the div is.
The snippet
<div class="trc-sermons" data-filters="1"></div> <script src="https://forms.theriverchurch.cc/sermons/embed.js" async></script>
Options
| Attribute | What it does |
|---|---|
data-series | Lock the widget to one series. Keys today:
let-us, romans. |
data-filters="1" | Show the series / preacher / location selects. They are built from the data, so a new series or campus appears on its own. |
data-limit | Results per page, 1–25. Default 8. |
data-heading | A heading rendered above the box. |
data-placeholder | Override the input's placeholder text. |
Examples
<!-- Just the current series, no filters --> <div class="trc-sermons" data-series="let-us" data-heading="Search this series"></div> <!-- Everything, with filters, ten at a time --> <div class="trc-sermons" data-filters="1" data-limit="10"></div> <!-- One script tag serves any number of divs on the page --> <script src="https://forms.theriverchurch.cc/sermons/embed.js" async></script>
What it will and will not do
- It inherits the host page's font and colours where it can, so it reads as part of the site rather than as a bolt-on. It has its own dark mode.
- It returns exactly what the public pages already show — the same summaries (only ones that passed the check), the same locations (an unconfirmed campus is labelled unconfirmed in the widget too), and a link to listen where we hold one.
- The browser grant is locked to
https://theriverchurch.cc,https://www.theriverchurch.cc,https://forms.theriverchurch.cc,https://sandforms.theriverchurch.cc. Pasting it on a site outside that list will load the script and get nothing back. - It never builds HTML out of transcript text, so a sermon that happens to contain a bracket cannot become markup on the church's website.
The endpoint underneath
GET https://forms.theriverchurch.cc/sermons/api/search.php?q=grace&limit=5 — JSON, read-only,
public. ?facets=1 returns the series, preachers, locations and topics the filters
are built from. Nothing in it is anything a visitor could not already read by clicking through.