Skip Navigation

[Resolved] Link text on URL custom field

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by matthewW-12 2 years, 8 months ago.

Author
Posts
#2324953

Tell us what you are trying to do?
Allow users to input link text when they add a URL custom field. It only seems possible to enter the link itself.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2325005

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

There is no such option, I'm afraid.

You would need a separate field to store the link text, apart from the link URL, and then when outputting the URL field construct your own link markup where the href attribute comes from the raw value of the URL field and the anchor text comes from the link text field.

#2325155

My issue is resolved now. Thank you!

#2326111

When you say separate field, do you mean a completely separate custom field? I think that would probably be too complicated. Or is it possible to add a sub-field to an existing field, or make a new field type based on an existing one maybe? I don't mind getting my hands dirty, if it's possible to do it.
It's a pity an option for link text isn't in the URL field, as you end up with a lot of ugly URLs cluttering the page. And it's a basic part of adding links.

#2326751

Not to worry. I've made a feature request for it anyway.