4 thoughts on “ACF Link Picker shortcode

  1. CG

    Hi there.
    Tried to add the code to functions.php , testes the shortcode and didn’t work…
    Any ideas?

    Reply
    1. Stanislav Khromov Post author

      Hard to say. Are you sure that the `field` attribute matches the name of your ACF Field? You can try using `var_dump(get_field(‘field_name’));` in a template to see if you can get the `field_name` field to show up. If it does, it should work like this as well: `[acf_link_picker field=”field_name”]`

      Reply
      1. CG

        Hello again.
        Yes, the name is correct, i’ve tested it.
        The field name is “product” and I changed on your code “‘field’ => ‘mylink'” to “‘field’ => ‘product'”.
        Am I wrong?

        It only displays on the text field with the shortcode, the shortcode itself.

        Reply
        1. Stanislav Khromov Post author

          It sounds like the shortcode didn’t get loaded properly. Add the code in your themes functions.php file or in a plugin.

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Markdown is allowed in comments.