• This has been mentioned in an earlier post “Shortcodes not working inside“. Here are some workarounds that worked for me.

    Does not work: <a href="[field URL custom=true]">Go to Website</a>
    Does not work: <a href='[field URL custom=true]'>Go to Website</a>
    Does not work: <a href=&quot;[field URL custom=true]&quot;>Go to Website</a>
    Does not work: <a href="[field URL custom=true]">Go to Website</a>
    Works:<a href=[field URL custom=true>Go to Website</a>
    Notes: Quotes around URL removed.
    URL is a custom field, hence custom=true
    This may have an issue if the given URL contains a “space”, although this should be escaped as %20
    Setting a variable also does not work.

    Title and image links

    You don’t need to build your own link if you use [field title-link] and [field image-link].

    Custom Content Shortcode could create its own workaround, something like:
    [field URL makelink] to generate , or
    [field URL makelinkshort] to generate <a href="URL" (unclosed so that parameters can be added)

    • This topic was modified 3 years, 4 months ago by iantresman.
    • This topic was modified 3 years, 4 months ago by iantresman.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter iantresman

    (@iantresman)

    This also works (this is the CCS workaround, so no extra workaround required):
    [link field=URL custom=true]Go to Website[/link]

    • This reply was modified 3 years, 4 months ago by iantresman.

    You can use pass to get something into an URL or other html – variables as well.

    In this link markup, simply escaping the brackets by doubling them can help:
    <a href="[[field URL custom=true]]">Go to Website</a>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shortcodes not working inside links’ is closed to new replies.