Skip Navigation

[Resolved] Custom Field URL – make nofollow

This thread is resolved. Here is a description of the problem and solution.

Problem:

Add nofollow to custom URL field.

Solution:

You can setup the HTML link manually, for example:

<a href='[types field="my-listen-link" output="raw"][/types]' rel="nofollow">Listen</a>

Please replace "my-listen-link" with your custom URL field slug

Relevant Documentation:

https://toolset.com/documentation/customizing-sites-using-php/functions/#url

output:

'raw' | 'normal'(default)

‘raw’=Display raw data stored in DB. No other formatting attributes (e.g. custom separator) will be respected.

This support ticket is created 6 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 2 voices.

Last updated by Luo Yang 6 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#898534

Tell us what you are trying to do?
Add a custom field to a custom data type. The custom field will be a URL. I would like the URL to be nofollow

Is there any documentation that you are following?
I was trying to follow this previous forum question: https://toolset.com/forums/topic/make-link-no-follow/
but did not understand where to put the php

Is there a similar example that we can see?

What is the link to your site?
hidden link
I would like the links that show as blue buttons to be nofollow.
Is there a way to do this?

#900268

Hello,

You can setup the HTML link manually, for example:

<a href='[types field="my-listen-link" output="raw"][/types]' rel="nofollow">Listen</a>

Please replace "my-listen-link" with your custom URL field slug

More help:
https://toolset.com/documentation/customizing-sites-using-php/functions/#url
output:
'raw' | 'normal'(default)
‘raw’=Display raw data stored in DB. No other formatting attributes (e.g. custom separator) will be respected.

#901149

Can I add this code to the custom view?

#901225

Yes, you can

#901784

Thank you, this seems to work.

#901812

You are welcome