> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thetinybell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress

> Install TinyBell on your WordPress hotel website.

## Installation methods

### Method 1: WPCode plugin (recommended)

1. Install and activate the [WPCode](https://wordpress.org/plugins/insert-headers-and-footers/) plugin.
2. Go to **Code Snippets > Header & Footer**.
3. Paste your TinyBell pixel code in the **Header** section:
   ```html theme={null}
   <script src="https://thetinybell.com/pixel/YOUR_PIXEL_KEY" defer></script>
   ```
4. Click **Save Changes**.

### Method 2: Theme header file

1. Go to **Appearance > Theme File Editor**.
2. Select `header.php` from the file list.
3. Find the `</head>` tag.
4. Paste the pixel code just before `</head>`.
5. Click **Update File**.

<Warning>
  If you update your theme, changes to header.php will be lost. Use a child theme or the WPCode plugin method instead.
</Warning>

### Method 3: Functions.php

Add this to your theme's `functions.php` or a custom plugin:

```php theme={null}
function tinybell_pixel() {
    echo '<script src="https://thetinybell.com/pixel/YOUR_PIXEL_KEY" defer></script>';
}
add_action('wp_head', 'tinybell_pixel');
```

## Verify installation

1. Visit your WordPress site.
2. Right-click > View Page Source.
3. Search for `thetinybell.com/pixel`. If you find it, the pixel is installed.

## Compatibility

TinyBell works with all major WordPress themes and page builders:

* Elementor
* Divi
* Astra
* GeneratePress
* Avada
* OceanWP
* Flavstarter
* Flavor starter

No conflicts with common plugins like Yoast SEO, WooCommerce, or caching plugins.

## Caching plugins

If you use a caching plugin (WP Rocket, W3 Total Cache, LiteSpeed Cache), the pixel will still work because it loads from an external URL. No special configuration needed.
