> For the complete documentation index, see [llms.txt](https://ae-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ae-docs.keywordrush.com/displaying-products/shortcodes.md).

# Shortcodes

Display a storefront anywhere with the `[affegg]` shortcode. The storefront's **id** is the only thing it needs:

```
[affegg id=10]
```

You'll find the shortcode on the storefront's screen, and there's an **Add storefront** button in the post editor that inserts it for you. You can also skip shortcodes entirely and use the **Affiliate Egg Storefront** block — see [Creating a storefront](/storefronts/storefronts.md).

## Options

| Attribute  | What it does                                                                                         | Example                                       |
| ---------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `id`       | The storefront to display (required).                                                                | `[affegg id=10]`                              |
| `limit`    | Show at most this many products.                                                                     | `[affegg id=10 limit=3]`                      |
| `offset`   | Skip the first N products.                                                                           | `[affegg id=10 offset=5 limit=3]`             |
| `next`     | Show the next N products — repeat to spread a storefront down a post.                                | `[affegg id=10 next=3]`                       |
| `random`   | Show N random products.                                                                              | `[affegg id=10 random=3]`                     |
| `order`    | Sort by a field, optionally reversed.                                                                | `[affegg id=10 order="price desc"]`           |
| `template` | Use a specific template instead of the default (see [Templates](/displaying-products/templates.md)). | `[affegg id=10 template=cards]`               |
| `hide`     | Hide one or more fields.                                                                             | `[affegg id=10 hide="description,domain"]`    |
| `btn_text` | Custom button text (supports placeholders — see below).                                              | `[affegg id=10 btn_text="Buy at %MERCHANT%"]` |

## Splitting a storefront with `next`

`next` lets you place a storefront's products at different points in an article. This shows the first 3:

```
[affegg id=10 next=3]
```

Add the same shortcode again lower in the post and it shows the **next** 3, and so on.

## Sorting with `order`

Sort by any of these fields: `title`, `price`, `manufacturer`, `in_stock`, `create_date`, `last_update`, `last_in_stock`, `shop_id`.

```
[affegg id=10 order=price]
```

Add `desc` for reverse order, or use `rand` for a random order:

```
[affegg id=10 order="price desc"]
[affegg id=10 order=rand]
```

## Hiding fields with `hide`

Hide one or more fields from the output — handy for a cleaner or more compact block. Pass a comma-separated list:

```
[affegg id=5 hide="description,domain"]
```

Fields you can hide: `description`, `price`, `oldprice`, `rating`, `brand`, `stock`, `domain`, `updated`, `disclaimer`.

## Custom button text with `btn_text`

Override the button text for a single block. You can include placeholders that fill in per product:

* `%MERCHANT%` — the merchant / shop name
* `%DOMAIN%` — the shop's domain
* `%PRICE%` — the product's price

```
[affegg id=5 btn_text="Buy at %MERCHANT%"]
```

To change the button text everywhere at once instead, use the setting in [Frontend text & wording](/displaying-products/frontend-text.md).
