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

  1. Use a child theme, so an update to your theme does not remove the change.
  2. 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>';
    } );
  3. Your theme must call wp_footer(), as almost every theme does.

A box on one page

  1. Edit the page and add a Custom HTML block where the box should appear.
  2. 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>
  3. 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.

DirectiveValue to add
script-srchttps://app.coursefinch.co.uk https://challenges.cloudflare.com
connect-srchttps://app.coursefinch.co.uk
frame-srchttps://challenges.cloudflare.com
font-srchttps://app.coursefinch.co.uk

Check it is working

  1. Open a page of your website in a private browser window. The button appears in the bottom corner.
  2. Select it and ask a question about your college.
  3. If nothing appears, open the browser console. A Content Security Policy error means an entry above is missing.
  4. 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)

Documentation for IT teams