# URL

> A web address, like https://example.com.

Source: https://uglydev.com/field-types/url/
Updated: 20 November 2026

**When to use it.** A web address: a social profile, a download, an external site.

**What the editor sees.** A single-line box that checks the address.

![The URL field on an edit screen](https://uglydev.com/wp-content/uploads/2026/11/shot-url-1.webp)

*The URL field on an edit screen.*

|  |  |
| --- | --- |
| **Name in files and code** | `url` |
| **`ugly_get()` gives** | Text. |
| **Behavior** | can be required; can share a line with other fields |

**Settings**

| Setting | What it does | Default |
| --- | --- | --- |
| **Placeholder** | Gray text shown while the field is empty. | (empty) |

**In your theme**

```php
<?php if ( ugly_get( 'website' ) ) : ?>
	<a href="<?php echo esc_url( ugly_get( 'website' ) ); ?>" rel="noopener">
		<?php echo esc_html( wp_parse_url( ugly_get( 'website' ), PHP_URL_HOST ) ); ?>
	</a>
<?php endif; ?>
```

**Good to know**

- An address that would run code (`javascript:`) is never kept.
- To also store the text of the link and whether it opens in a new tab, use [Link](https://uglydev.com/field-types/link/).
