Advanced Custom Fields: Link

Description

Integrates WordPress’ default link picker into Advanced Custom Fields

As of ACF Pro 5.6.0, this field is built-in, so this plugin should not be used.

Allows you to select an existing piece of content or enter a custom URL, set the link title, and choose whether or not the link should open in a new window/tab.

Only works with ACF version 5 and above.
Requires PHP 5.4 or above.

After saving, you can access your data as an array:

array(
    [url]    => http://site.com/page/
    [title]  => Page!
    [target] => 0
)

Screenshots

  • Field when no link has been selected
  • Link selection modal box
  • Field when a link has been selected

Installation

  1. Upload acf-link folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. When editing an ACF Field Group, select ‘Link’ as the field type

FAQ

Installation Instructions
  1. Upload acf-link folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. When editing an ACF Field Group, select ‘Link’ as the field type

Reviews

Thanks for data migration!

Thank you for creating a simple migration path to the new ACF 5.6 data structure. It would have been easy to forgo that last update and let people figure it out for themselves, but you made it easy for everyone. Truly appreciated.

A little bug

When you modify the link to select another page, the Title is not updated.

Real timesaver!

It had never even crossed my mind to integrate with the built-in link picker dialog. I had previously had two fields and a checkbox to choose between an external URL (simple URL field) and a “page link” field… This is, of course, much simpler – thank you! I originally found this plugin because another one which does the same is featured on ACF’s addons page, but since that one hasn’t been updated for a while it feels saver to stick with this brand new one. Works really well, good job! 🙂

Read all 3 reviews

Contributors & Developers

“Advanced Custom Fields: Link” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.1.7

2017-08-02
* Deprecation notice for ACF Pro 5.6.0

1.1.6

2017-05-23

  • Fixes bug that broke dashboard in last release

1.1.5

2017-05-22

1.1.4

2016-08-12

  • If link title is empty, it auto populates based on search selection

1.1.3

  • Added fix for pages that don’t have editors

1.1.2

  • Improvement to allow field to work correctly anywhere ACF can be used

1.1.1

  • Fixes usage on pages without an editor

1.1.0

  • Fixes bug where link would be added to WYSIWYG editor also
  • Adds new settings to hide the title and target fields

1.0.2

  • Fixes bug where link would be added to editor also

1.0.1

  • Fixes class names for ACF icons

1.0.0

  • First release