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

# Preset links

> The two URL forms, renaming a preset, and what happens to links you already shared

Every preset has a link, and that link is the only way to reach it. There's no product page and no catalogue entry.

## Two forms, one preset

Both of these go to the same preset:

```text theme={null}
https://yourstore.com/preset/starter-kit      pretty permalink
https://yourstore.com/?preset=starter-kit     query string
```

The pretty form needs pretty permalinks turned on in WordPress. The query form works either way.

On a site with plain permalinks, every preset link the plugin gives you is the query form, `?preset=starter-kit`, or your own parameter if you've changed it. That includes the editor, the list's Link column and the **Link preview** in Settings.

In the editor, the **Preset link** note beside the form shows the link with a **Copy** button and an **Open link** shortcut. When the link is the pretty form, the query form is listed under it as **Also answers to**. A new preset has no link until its first save, so until then the note shows only the path its name will produce.

🖼️

Screenshot pending

The Preset link note in the editor's margin, with the copy button

## Changing the base and the parameter

You control both halves, under **Settings → Link settings**:

| Setting | Key | Default | Controls |
| - | - | - | - |
| URL parameter | `url_param` | `preset` | The `?preset=` half |
| Pretty permalink base | `permalink_base` | `/preset/` | The `/preset/` half |

Change the base to `/kit/` and every preset link becomes `/kit/starter-kit`. The **Link preview** under the two fields shows how every preset link will read before you save. On a site with plain permalinks it shows the query form, and its note says links use the URL parameter. It takes effect when you save, and permalinks are flushed for you.

> [!WARNING]
>
> Changing the base or the parameter doesn't leave a redirect behind. Links you've already shared in the old form stop working straight away. Renaming a preset does leave one (see the next section), but the base is a store-wide change, so set it before you start sharing links.

The parameter name is checked against names WordPress and WooCommerce already own, and a collision is refused. The plugin leaves its own parameter out of that check, so saving the settings screen twice won't flag a collision with itself.

## Renaming a preset

You edit the slug in the editor's **Preset details** card, beside the name. The button next to it regenerates the slug from the name. Change a preset's slug and the old one keeps working for 30 days, as a permanent redirect to the new one.

Once you share a link it's out of your hands. You can't edit a newsletter you sent last week. Thirty days is long enough for traffic from a campaign already out there to drain away.

After 30 days the old slug stops working, and it's refused like any other link that matches no preset.

> [!TIP]
>
> Each rename adds its own entry. Rename a preset twice and both old slugs redirect, each one expiring 30 days after its own rename.

## Slug collisions

Two presets can't share a slug. If you type one that's taken, the new preset gets a number on the end, `starter-kit-2`, and saves. It won't refuse the save and make you think of another name.

If the exact slug matters to you, check the **Preset link** note after saving.

## When a link does not resolve

A mistyped slug, a deleted preset, or a rename older than 30 days are all refused. They go wherever **Settings → Cart behaviour → Unavailable links** sends a refused customer: the cart by default, or a custom URL of your own. That one setting covers every way a link can be refused. See [Where customers land](https://docs.smartwpplugins.com/cartpresets/links/destinations.md#unavailable-links).

They also get a notice, as long as **Show an error message** is on: *That link is not valid. It may have been changed or removed.*

That wording deliberately doesn't say whether the preset ever existed. Anyone can guess a URL, and a message that confirms what was there tells a stranger more than it tells your customer. You can reword it. See [Cart notices and wording](https://docs.smartwpplugins.com/cartpresets/links/wording.md).

## UTM parameters

Any query parameters on a preset link, such as `?utm_source=newsletter`, are always carried through the redirect to wherever the customer lands. Your analytics still attribute the visit.

**Append the preset name as a UTM campaign** (**Settings → Link settings**, off by default) also adds `utm_campaign=<preset slug>` to the destination. That way you can tell presets apart in your analytics without tagging links by hand.

## Settings reference

| Setting | Key | Default |
| - | - | - |
| URL parameter | `url_param` | `preset` |
| Pretty permalink base | `permalink_base` | `/preset/` |
| Append the preset name as a UTM campaign | `utm` | Off |

**Unavailable links** decides where a link that resolves to nothing sends the customer. It sits under Cart behaviour because it covers every refusal, including a bad slug.

## For developers

`cartpresets_preset_url` shapes the URL a preset outputs. It doesn't affect how an incoming request is parsed. That read path is separate, so changing one keeps the other working. See the [hooks reference](https://docs.smartwpplugins.com/cartpresets/developers/hooks-reference.md#order-and-display).


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