> For the complete documentation index, see [llms.txt](https://doc.dastra.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.dastra.eu/features/cookies/integration/quickstart/wordpress.md). Agents can also search and read this documentation through its [MCP server](https://doc.dastra.eu/~gitbook/mcp).

# Wordpress

Apprenez à intégrer la bannière de cookies Dastra sur un site WordPress.

## Installez le plugin Dastra

Le plugin Dastra est la méthode recommandée : il n'est pas écrasé par les mises à jour de votre thème.

1. Dans la bannière, ouvrez la section **Installation** et cliquez sur la carte **Wordpress**.
2. Cliquez sur **Visiter la page du plugin**, ou recherchez le plugin « Dastra » dans la liste des extensions de votre administration WordPress. Vous pouvez aussi télécharger le plugin depuis cette fenêtre pour l'installer manuellement.
3. Installez et activez le plugin.
4. Dans WordPress, ouvrez **Réglages** > **Dastra** et cliquez sur **Link with Dastra** pour relier le plugin à votre bannière.

<figure><img src="https://1301193153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LvBxs22wUMicv9uWp6C-2584506019%2Fuploads%2Fgit-blob-29b4046f66b6cc20eef0c407fe510ed69c80a6c6%2Fcookies-wordpress-1.png?alt=media" alt="La fenêtre WordPress de la section Installation avec le lien vers le plugin"><figcaption><p>La carte « Wordpress » de la section Installation</p></figcaption></figure>

## Ou collez le code dans le thème

Si vous ne pouvez pas installer de plugin, collez le code de la bannière dans le thème. Une mise à jour du thème écrase cette modification : reportez-la alors dans un thème enfant.

1. Dans la section **Installation** de la bannière, cliquez sur la carte **Javascript** et copiez le code.
2. Dans l'administration de votre site WordPress, cliquez sur **Apparence**, puis sur **Éditeur de thème**.
3. Sélectionnez le fichier `footer.php`, puis insérez le code juste avant la balise `</body>`.

![L'éditeur de thème WordPress avec le fichier footer.php ouvert](https://1301193153-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LvBxs22wUMicv9uWp6C%2F-M72kNk_KM6jhRjCAkaq%2F-M72nCVjJI28ck1OjxAV%2Fimage.png?alt=media\&token=706d55b3-31fd-4a51-b906-ed18893ba233)

4. Cliquez sur **Mettre à jour le fichier**, puis rafraîchissez la page de votre site. La bannière apparaît.

Ajoutez aussi un bouton qui rouvre la bannière, comme décrit dans [Démarrage rapide](https://doc.dastra.eu/features/cookies/integration/quickstart.md#rouvrir-la-banniere-depuis-un-bouton).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.dastra.eu/features/cookies/integration/quickstart/wordpress.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
