# Add Snippet code to Theme Code

## Find the Product Card Liquid File and Insert Snippet on Dawn Theme

{% stepper %}
{% step %}

### Locate the product card liquid file

<figure><img src="https://3674262665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4avV7pCFFNpyfYTGELr9%2Fuploads%2FIUpJ25mcXkoDnunhBz7x%2Fimage.png?alt=media&#x26;token=e4fb45cd-4a91-4189-9696-a154251ee5ce" alt=""><figcaption><p>Find a way to get into Edit theme code</p></figcaption></figure>

<figure><img src="https://3674262665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4avV7pCFFNpyfYTGELr9%2Fuploads%2Fr6xzDwu6hKR3yktasSeA%2Fimage.png?alt=media&#x26;token=81ab580e-39bf-4a82-96d7-763603f3bebe" alt=""><figcaption><p>Open folder "snippets" > card-product.liquid </p></figcaption></figure>
{% endstep %}

{% step %}

### Insert the Snippet

<figure><img src="https://3674262665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4avV7pCFFNpyfYTGELr9%2Fuploads%2FOT6G7vTmWL62YLvoid7J%2Fimage.png?alt=media&#x26;token=d288829d-6ab4-401c-940a-3b9fd0901a79" alt=""><figcaption><p>Insert the snippet code to your theme</p></figcaption></figure>

```liquid
<div class='Sun-Wishlist-ProductCard__Injection' data-product-id="{{ card_product.id }}"
           data-variant-id="{{ card_product.selected_or_first_available_variant.id }}"></div>
```

Ensure the card\_product object matches your theme’s product object (e.g., product\_card, product).
{% endstep %}

{% step %}

### Save your changes

<figure><img src="https://3674262665-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4avV7pCFFNpyfYTGELr9%2Fuploads%2FdXYxUXqaLvtPGSdCa2fh%2Fimage.png?alt=media&#x26;token=d66b2dfc-0e2f-4a80-9589-2feaab5ae093" alt=""><figcaption><p>Save changes and Preview</p></figcaption></figure>

Save the file and check your store to see the Wishlist button on home/collection page displayed.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://avadagroup.gitbook.io/joy-wishlist/getting-started/publish-your-docs/wishlist-button/add-snippet-code-to-theme-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
