Skip to content

WordPress

Add the Patchrooms loader to your site through your theme’s functions.php or a header/footer plugin — no page templates to edit by hand.

  • Admin access to the WordPress dashboard (Appearance → Theme File Editor, or a plugin that inserts scripts).
  • A project key (pr_…) from your Patchrooms dashboard, under Settings.

Hook the script into wp_footer so it prints on every page, right before </body>:

  • Directorywp-content/
    • Directorythemes/
      • Directoryyour-child-theme/
        • functions.php
add_action( 'wp_footer', function () {
?>
<script src="https://room.patchrooms.com/v1/patchrooms/pr_xxx.js"></script>
<?php
} );

Replace pr_xxx with your project key. Use a child theme — edits to a parent theme’s functions.php are wiped out on the next theme update.

If you don’t maintain a child theme, any plugin that inserts arbitrary scripts into the site header/footer works. WPCode is the most widely used one: add a new Header & Footer snippet, paste the <script> tag, set it to load in the Footer, and save. There’s no Patchrooms-specific plugin — this is a generic script insertion, same as for any other embed.

If you only want the widget on a staging copy of the site (not production), gate the wp_footer hook by domain:

add_action( 'wp_footer', function () {
if ( strpos( home_url(), 'staging.example.com' ) === false ) {
return;
}
?>
<script src="https://room.patchrooms.com/v1/patchrooms/pr_xxx.js"></script>
<?php
} );

Then add that staging domain to Allowed origins in your project’s Settings tab. If the list is non-empty, the server only accepts reports whose page Origin matches it — so the loader stays inert anywhere else, even if the script leaks into another environment.

  1. Load the page (staging or production, depending on which host you wired up).

  2. Confirm the Patchrooms launcher appears docked to the edge of the viewport.

  3. Click it, leave a text block, and submit. The report should appear in your project’s Feedback tab within a few seconds.

If the launcher doesn’t show up, see Troubleshooting — the most common cause is a cached page (WordPress page caching plugins can serve an old copy without the script) or a leftover pr_xxx placeholder key.