Add Coursefinch to WordPress
There is no WordPress plugin yet. You add one line of script, which takes a few minutes for someone who looks after your theme.
A button on every page
- Use a child theme, so an update to your theme does not remove the change.
- At the end of the child theme's functions.php, after what is there, add these lines to print the script in the footer of every page:
add_action( 'wp_footer', function () { echo '<script src="https://app.coursefinch.co.uk/widget/coursefinch.js" data-coursefinch-launcher="your-college" defer></script>'; } ); - Your theme must call wp_footer(), as almost every theme does.
A box on one page
- Edit the page and add a Custom HTML block where the box should appear.
- Paste the two lines into it. If you added the button to every page, paste only the first line: the page then shows the box instead of the button.
<div data-coursefinch="your-college"></div> <script src="https://app.coursefinch.co.uk/widget/coursefinch.js" defer></script> - Only users allowed to post unfiltered HTML can save a script, such as Administrators. Otherwise WordPress removes it.
Content Security Policy
If your website sets a Content Security Policy, allow these.
| Directive | Value to add |
|---|---|
| script-src | https://app.coursefinch.co.uk https://challenges.cloudflare.com |
| connect-src | https://app.coursefinch.co.uk |
| frame-src | https://challenges.cloudflare.com |
| font-src | https://app.coursefinch.co.uk |
Check it is working
- Open a page of your website in a private browser window. The button appears in the bottom corner.
- Select it and ask a question about your college.
- If nothing appears, open the browser console. A Content Security Policy error means an entry above is missing.
- If your website combines, delays or moves scripts to make pages faster, leave this one out of that.
Sources
- WordPress Developer Resources, wp_footer hook (read 25 November 2026)
- WordPress Developer Resources, Child Themes (read 25 November 2026)
- WordPress Documentation, Custom HTML block (read 25 November 2026)
- WordPress Documentation, Roles and Capabilities (read 25 November 2026)