# WordPress (https://talivia.com/docs/installation-guides/wordpress)



The safest WordPress setup is to add Talivia once site-wide through a child theme or a trusted custom-code plugin.




## Option 1: Child theme [#option-1-child-theme]

Add the script through the `wp_footer` hook in your child theme's `functions.php`.

```php
add_action('wp_footer', function () {
    ?>
    <script defer src="https://talivia.com/script.js" data-website-id="YOUR_WEBSITE_ID"></script>
    <?php
});
```

## Option 2: Custom-code plugin [#option-2-custom-code-plugin]

Use a plugin that inserts code before the closing `</body>` tag and paste the universal snippet.

```html
<script defer src="https://talivia.com/script.js" data-website-id="YOUR_WEBSITE_ID"></script>
```

Keep it site-wide. Add the tracker once globally, not inside individual posts.

Open the WordPress site in a normal browser tab and check Talivia for a new session.
