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

# TWICE plugin for WordPress

> How the TWICE plugin embeds a TWICE 1.0 store in a WordPress page, the settings it takes, and where to find each value it needs.

> [!WARNING]
>
> **The TWICE plugin for WordPress runs on TWICE 1.0.** TWICE 1.0 is the earlier version of TWICE Commerce, and it does not support every feature these docs describe. Use the [online store](https://www.twicecommerce.com/docs/concepts/sales-channels/online-store.md) on the current version instead. It does not embed in another site.

The TWICE plugin embeds your TWICE 1.0 store in a page of a WordPress site you already run. Customers browse and order inside the embedded store, and you manage the catalog and the orders in TWICE Admin.

TWICE 1.0 calls a listing a product and a collection a category. These pages use the 1.0 names, because the plugin and the 1.0 admin show them.

## How it works

Install the plugin from the WordPress plugin directory, where it is listed as **Twice Commerce**. It adds one way to place the store on a page in each WordPress editor:

| Method | Where you add it | Settings |
| - | - | - |
| **Twice Shop Block** | The block editor (Gutenberg) | Typed into the block's settings panel on the right |
| `[twice_commerce_shop]` shortcode | Any editor that accepts a shortcode, including the **Classic Editor** | Written as attributes inside the shortcode |

Both need your shop name, and both can narrow the store to one category, one product or one location.

### Shop name

The shop name is your **Twice domain path**, the ending of your store address: `businessname` in `twice.shop/businessname`. Find it in the 1.0 admin under **Account → Domains → Urls**.

WordPress accepts a shop name made of letters and numbers only. Change the **Twice domain path** first if yours has a hyphen or another character. Changing it stops the old store address from working, so update every link you have shared.

### Block settings

| Setting | What it does |
| - | - |
| **Specific Category** | Shows one category. Enter its category ID. |
| **Specific Product** | Shows one product. Enter its product ID. |
| **Specific Location** | Shows one location's store. Enter its location ID. |
| **Enable Locations View** | Shows every location so the customer picks one first. |
| Height | Sets the block's height in pixels or as a percentage. |
| **Padding** | Sets the vertical padding: `no-padding`, `small-padding`, `medium-padding` or `large-padding`. |
| **Disable Auto Scroll** | Stops the page scrolling to the top of the store when a customer moves through it. |
| **Disable Height Animation** | Changes the block's height without the animation. |
| **Advanced** | Adds your own CSS classes to the block. |

### Shortcode attributes

| Attribute | Example |
| - | - |
| `shop` (required) | `[twice_commerce_shop shop="businessname"]` |
| `category` | `[twice_commerce_shop shop="businessname" category="CdQUqxDkVBINOkizCwY0"]` |
| `product` | `[twice_commerce_shop shop="businessname" product="W0DxaPgAHz4yR1UqNoJQ"]` |
| `location` | `[twice_commerce_shop shop="businessname" location="mainstore"]` |

### Where each value is

| Value | Where in the 1.0 admin | Example |
| - | - | - |
| Shop name | **Account → Domains → Urls**, **Twice domain path** | `twice.shop/`**`businessname`** |
| Category ID | **Catalog → Categories**, the end of the category's address | `admin.twicecommerce.com/catalog/categories/`**`CdQUqxDkVBINOkizCwY0`** |
| Product ID | **Catalog → Products**, the end of the product's address | `admin.twicecommerce.com/catalog/products/`**`W0DxaPgAHz4yR1UqNoJQ`** |
| Location ID | **Account → Domains → Urls**, **Store URL endings** | `twice.shop/businessname/`**`mainstore`** |

A location ID is needed only when you run more than one location.

## Usage

1. [Install the TWICE plugin on WordPress](https://www.twicecommerce.com/docs/guides/sales-channels/install-the-twice-plugin-on-wordpress.md) and place the store with the **Twice Shop Block**.
2. [Embed the store with a shortcode](https://www.twicecommerce.com/docs/guides/sales-channels/embed-the-twice-store-with-a-shortcode.md) when your page builder has no block editor.
3. [Show one category on a WordPress page](https://www.twicecommerce.com/docs/guides/sales-channels/show-one-category-on-wordpress.md), or one product or location the same way.

## FAQ

> [accordion] The store does not appear on the WordPress page
>
> Check each of these in turn, and reload the page after each change:
>
> * **The plugin is out of date.** Under **Plugins** in WordPress, click **Update Now** on the TWICE plugin if an update is offered. Turn on auto-updates to stay current.
> * **WordPress is out of date.** Check **Dashboard → Updates** and install the latest version.
> * **The page is built with Elementor.** Elementor can stop the store from displaying. Place it on a page in the **Classic Editor** with the shortcode instead.
> * **The theme interferes.** Activate a default theme such as **Twenty Twenty-Three** under **Appearance → Themes** for a test. If the store appears, your theme is the cause.

> [accordion] WordPress rejects my shop name
>
> The shop name has a character other than a letter or a number. Change the **Twice domain path** under **Account → Domains → Urls** in the 1.0 admin, then enter the new name.

## Related articles

> [card] [Add TWICE to a WordPress site](https://www.twicecommerce.com/docs/guides/sales-channels/add-twice-to-a-wordpress-site)
>
> The walkthroughs for installing the plugin and placing the store.

> [card] [Online Store](https://www.twicecommerce.com/docs/concepts/sales-channels/online-store.md)
>
> The storefront built into the current version of TWICE Commerce.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.