<p>Assuming you want the first category that's selected in the field, you'd set your "Entry URL Format" setting to:</p>

<pre><code>{categoryFieldHandle.first().slug}
</code></pre>

<p>You can access any of your custom fields by their handle in a similar way.</p>

CC BY-SA 3.0
2017-11-05T16:45:01.390Z
Just in case there is no first categoryFieldHandle, I use `{categoryFieldHandle.first().slug ?? 'no-category'}`
Marion Newlevant
CC BY-SA 3.0
2017-07-07T03:56:24.000Z
2017-07-07T03:56:24.000Z
Brad Bell
<p>Is it possible to include category or tag slug in the entry URL format?
Would you please let me know the tags that make it, if possible?</p>

<entry><url><format><tag>
Is it possible to include category slugs in the entry URL format?
# Is it possible to include category slugs in the entry URL format?

(Asked by: username_0 on 2017-07-07)

Is it possible to include category or tag slug in the entry URL format?
Would you please let me know the tags that make it, if possible?

**Tags:** entry, url, format, tag

---

## 1 answers

### Answer by username_1 on 2017-07-07. Score: 2

Assuming you want the first category that's selected in the field, you'd set your "Entry URL Format" setting to:
{categoryFieldHandle.first().slug}

You can access any of your custom fields by their handle in a similar way.

> **Comments:**
> **username_2**: Just in case there is no first categoryFieldHandle, I use `{categoryFieldHandle.first().slug ?? 'no-category'}`  

---

