The URL Field

Updated 22 Dec, 2018

The "URL" custom field gives you the ability to add a link with customized Text, URL, Classes and more.

Field Settings

The "URL" custom field provides you the way to set default link text, default way to open the link, custom class(es), set whether your URL will have attributes such as NoFollow, NoReferrer, whether to treat the link as downloadable as well as add custom javascript code.

acf-url-field-settings

As you can see from the screenshot above, after selecting the "ACF - URL" type, the settings for this field will appear.

Let's see what each option does.

Name Description
Name The name will be used to identify the field. Leave this blank and Joomla will fill in a default value from the title.
Label The label of the field to display.
Description A description of the field that will be displayed in the label tooltip.
Required Is this a mandatory field?
Default Link Text Set a link text to be used by default
Default Open in Set the default way to open the link
URL Class Customize your URL with your own CSS Classes
NoFollow Selecte whether to add NoFollow attribute so search engines wont follow this link.
NoReferrer Select whether to add NoReferrer attribute which wont send the HTTP referrer head so it won't be tracked by analytics tools.
Treat as Download Link Select whether to download the file instead of navigating to the link.
on Click Enter Javascript code to run on click.

Usage

Once you are in your Article's Edit screen, choose the "Fields" Tab to see the URL custom field as you can see in the screenshot below.

acf-url-field-usage

In the input field, you can enter the text of the link, the URL as well as how to open the link(same tab, new tab or new window).

Frontend Display

Take a look at the screenshot below to see how it could be displayed in your frontend.

acf-url-frontend