# WordPress feedback widget: add it in 2 minutes

> Add a website feedback widget to WordPress without a plugin, using a code snippet in your child theme, or with a header and footer code plugin.

Source: https://commentpin.com/guides/add-feedback-widget-wordpress
Last updated: 2026-12-02

## How do I add a feedback widget to WordPress?

A WordPress feedback widget is one script tag in your site's footer. You do not need a dedicated plugin.

First, create a project in the dashboard, add your domain to **Allowed domains**, and copy the project key.

## Option 1: child theme

Add this to your child theme's `functions.php`:

```php
add_action('wp_footer', function () {
    ?>
    <script src="https://commentpin.com/widget.js" data-project="YOUR_PROJECT_KEY" defer></script>
    <?php
});
```

Only for logged-in users, for example during a review:

```php
add_action('wp_footer', function () {
    if (!is_user_logged_in()) {
        return;
    }
    ?>
    <script src="https://commentpin.com/widget.js" data-project="YOUR_PROJECT_KEY" defer></script>
    <?php
});
```

## Option 2: a code snippet plugin

Use any plugin that adds code to the footer of every page, and paste:

```html
<script src="https://commentpin.com/widget.js" data-project="YOUR_PROJECT_KEY" defer></script>
```

## Check it works

Open the site, click the feedback button and send a test report.

More detail in the [install docs](/docs/install-the-widget). See [client feedback for agencies](/use-cases/agencies), or the [Webflow](/guides/add-feedback-widget-webflow) and [Shopify](/guides/add-feedback-widget-shopify) guides.

## FAQ

### Do I need a WordPress plugin?

No. The widget is one script tag. You can add it with a few lines in a child theme, or with any plugin that adds code to the footer.

### Will theme updates remove it?

Not if you use a child theme or a code snippet plugin. Edits to a parent theme are lost when it updates.

### Can I show it only to logged-in users?

Yes. Wrap the snippet in a check for is_user_logged_in() in PHP.

### Does it work with page builders?

Yes. The widget runs on the page in the browser, whatever builder made it.

### Does it work on WordPress.com?

WordPress.com allows plugins on its paid plans, so you can use a code snippet plugin there. Free WordPress.com sites cannot add the script.
