Link Field

Link anywhere: an external URL or existing content.

The Link field points anywhere: an external URL, or existing content found by searching, with the link picker WordPress uses everywhere else.

Configuration

Go to Modern Fields > Fields groups and add the Link field. Its settings are in the inspector:

Effect
Ask for a link textAdds a text input for the label of the link. On by default.
Allow opening in a new tabOffers the “Open in new tab” option. On by default.
The Link field settings

The field stores the URL, the link text and the new tab choice. modern_fields_get_link() turns the value of get_field() into a ready-to-use link, with its url, title and target. It returns null when there is nothing to link to.

PHP

Without code, the Field value block displays the field as a Button block carrying the destination, the label and the target.


Multi Token Field

Select Field


In this documentation