Title: Issue with custom link fields
Last modified: August 30, 2016

---

# Issue with custom link fields

 *  Resolved [jenjohn](https://wordpress.org/support/users/jenjohn/)
 * (@jenjohn)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/issue-with-custom-link-fields/)
 * I’ve been monitoring this support forum and I’m impressed by the popularity of
   this awesome plugin and by Eliot’s quick responses. I had issues with my site
   as soon as I upgraded to 4.2.3, but have followed this forum and applied plugin
   updates as they become available. Some of my issues went away with one update
   only to come back with the next update. This is where things stand, hopefully
   it helps with testing use cases:
 * I have a custom type with a custom text field that’s used for storing links to
   external sites.
    1. I have a shortcode on a page using `[loop...]<a href="[field
   mylink]">My Link</a>...[/loop]`. Here I use count=”1″ to get only the first item.
   2. I also have a widget/sidebar on the same page that uses pretty much the same
   loop as #1, but here I use count and offset to get items 2-6.
 * In version 2.6.5, #1 was broken but #2 worked fine.
    In the latest version 2.7.1,#
   1 works fine but #2 is broken.
 * For the time being I’ve removed my sidebar since all links shown there are going
   nowhere. I can live without it until things stabilize a bit more or until WP 
   4.2.4 is released.
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [jenjohn](https://wordpress.org/support/users/jenjohn/)
 * (@jenjohn)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/issue-with-custom-link-fields/#post-6394104)
 * Not sure if this is valid use of the shortcode, but a workaround that seems to
   work is to use [pass] inside [loop]:
 *     ```
       [loop...]
       [pass fields='mylink,title']
       <a href='{MYLINK}'>{TITLE}</a>
       [/pass]
       [/loop]
       ```
   
 * So far it takes care of all the lingering issues with links and shortcodes. Do
   you see any potential issue with doing it this way?
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/issue-with-custom-link-fields/#post-6394105)
 * Hello,
 * Here is a recent addition, to make a field value into a link:
 *     ```
       [link field=mylink][field title][/link]
       ```
   
 * For available parameters, please see: Main Features -> Field -> Link to field
   value.
 * All versions after WP 4.2.3 will continue to filter out shortcodes in HTML attributes,
   so this method will ensure compatibility.
 *  Thread Starter [jenjohn](https://wordpress.org/support/users/jenjohn/)
 * (@jenjohn)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/issue-with-custom-link-fields/#post-6394108)
 * Awesome! Thanks for the heads-up and for all the great support.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Issue with custom link fields’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * 3 replies
 * 2 participants
 * Last reply from: [jenjohn](https://wordpress.org/support/users/jenjohn/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/issue-with-custom-link-fields/#post-6394108)
 * Status: resolved