# Add Shoprocket to a WordPress site

> Sell from your WordPress site without a shop plugin. Paste your embed code into a Custom HTML block, or an HTML widget in Elementor, and update the page. Add one line to your site's header so the cart works on every page.

Help Centre / Embedding - Updated 19 November 2026

You can sell from your WordPress site without installing a shop plugin. You make an embed in Shoprocket, then paste its code into a page. The cart and checkout open on your own site, so customers never leave it.

## Before you begin

- Add at least one active product in Shoprocket.
- You need to be an Administrator on your WordPress site. WordPress removes script code saved by other roles, and on a multisite network only a Super Admin can save it.
- On **WordPress.com**, script code only runs on a plan that includes plugins, after you have activated the hosting features. On the free plan WordPress.com removes the code when you save. A site you host yourself (WordPress.org) has no such limit.

## Step 1: Get your embed code

1. In your Shoprocket dashboard, go to **Embeds** and click **New embed**.
2. Choose what it shows and a layout, then click **Continue**.
3. Click **Save & get code**, then **Copy code**.

![The Get code panel with site builder tabs, the embed code and the Copy code button](https://shoprocket.io/img/help/embed-on-any-website/get-code.webp)

For more on the layouts you can pick, see [Embed Shoprocket on any website](https://shoprocket.io/help/embed-on-any-website.md).

## Step 2: Paste the code into your page

**In the block editor:**

1. Open the page or post and click the **+** button where the shop should appear.
2. Search for "HTML" and choose **Custom HTML**.
3. Paste your code into the block.
4. Click **Update** (or **Publish**).

**In the classic editor:** switch to the **Text** tab, paste the code where the shop should appear, and click **Update**.

**In Elementor:** drag an **HTML** widget onto the page, paste the code into it, and click **Update**. Elementor only lets Administrators use this widget unless you change it in its Role Manager.

Open the page on your live site to check the shop appears. The editor may show only an empty box, because it does not run the code while you edit.

## Step 3 (recommended): Add Shoprocket to every page

Your floating cart and live chat only show on pages that load Shoprocket. One line in your site's header loads it on every page, so customers can open their cart from anywhere on your site.

1. In **Embeds**, click **Copy** on the **Add Shoprocket to every page of your site** card.
2. In WordPress, install a header and footer plugin such as **WPCode**. Open **Code Snippets**, then **Header & Footer**.
3. Paste the line into the **Header** box and save.
4. Open any page of your site. Back in **Embeds**, the card changes from **Not seen yet** to **Connected**.

If you use Elementor Pro, you can skip the plugin. Open **Elementor**, then **Custom Code**, paste the line, and set the location to the head.

Once the line is in your header, paste only the last line of your embed code on each page, the one starting `<div`.

## If the shop doesn't appear

- **The block shows the code as text.** You pasted it into a Paragraph or Code block. Use a **Custom HTML** block instead.
- **The code disappears when you save.** Your WordPress account can't save script code. Ask the site's Administrator to paste it, or on WordPress.com check that your plan includes plugins.
- **A caching or speed plugin is on.** Clear its cache after you update the page. If the shop still doesn't load, exclude Shoprocket's script from the plugin's "delay JavaScript" setting.

## No code allowed on your plan?

You can still sell. Share a buy link for a product from its page in Shoprocket, or send customers to [your hosted shop](https://shoprocket.io/help/your-hosted-shop.md).

## Related

- [Embed Shoprocket on any website](https://shoprocket.io/help/embed-on-any-website.md)
- [Embed one product or a category](https://shoprocket.io/help/embed-a-single-product-or-category.md)
- [Replace your old Shoprocket code](https://shoprocket.io/help/replace-old-shoprocket-code.md)

[Open Embeds in your dashboard](https://app.shoprocket.io/go/embeds)

---

- HTML version: https://shoprocket.io/help/add-shoprocket-to-wordpress
- Language: English (en)
- Also in: [العربية](https://shoprocket.io/ar/help/add-shoprocket-to-wordpress.md), [Deutsch](https://shoprocket.io/de/hilfe/shoprocket-zu-wordpress-hinzufuegen.md), [Ελληνικά](https://shoprocket.io/el/help/add-shoprocket-to-wordpress.md), [Español](https://shoprocket.io/es/ayuda/anadir-shoprocket-a-wordpress.md), [Français](https://shoprocket.io/fr/aide/ajouter-shoprocket-a-wordpress.md), [עברית](https://shoprocket.io/he/help/add-shoprocket-to-wordpress.md), [हिन्दी](https://shoprocket.io/hi/help/add-shoprocket-to-wordpress.md), [Bahasa Indonesia](https://shoprocket.io/id/bantuan/tambahkan-shoprocket-ke-wordpress.md), [Italiano](https://shoprocket.io/it/aiuto/aggiungere-shoprocket-a-wordpress.md), [日本語](https://shoprocket.io/ja/help/add-shoprocket-to-wordpress.md), [Lietuvių](https://shoprocket.io/lt/pagalba/shoprocket-wordpress-svetainei-prideti.md), [Norsk](https://shoprocket.io/nb/hjelp/legg-til-shoprocket-i-wordpress.md), [Nederlands](https://shoprocket.io/nl/hulp/shoprocket-toevoegen-aan-wordpress.md), [Polski](https://shoprocket.io/pl/pomoc/dodaj-shoprocket-do-wordpressa.md), [Português](https://shoprocket.io/pt/ajuda/adicionar-shoprocket-ao-wordpress.md), [Română](https://shoprocket.io/ro/ajutor/adauga-shoprocket-pe-wordpress.md), [Русский](https://shoprocket.io/ru/help/add-shoprocket-to-wordpress.md), [ไทย](https://shoprocket.io/th/help/add-shoprocket-to-wordpress.md), [Türkçe](https://shoprocket.io/tr/yardim/shoprocket-wordpress-sitesine-ekleme.md), [中文](https://shoprocket.io/zh/help/add-shoprocket-to-wordpress.md)
