Skip Navigation

[Resolved] External links are opening as pages of my current site

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

Problem:

Links in URL custom field gets appended to site url when clicked rather than going to the URL that is stored in the field.

Example when google.com is entered into the url field it gives the below on the frontend
mysite.com/google.com

Solution:

This is happens because you are adding the URL to a url field without adding http:// before the actual URL.

You will need to edit your fields to include the http:// to resolve the issue. Secondly I would recommend enabling the field validation for this In your field settings at Toolset -> Custom fields.

This will ensure that only valid URL's are added to the field and prevent this from happening in the future.

This support ticket is created 4 years, 6 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by aharonK 4 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#1980811

Tell us what you are trying to do?
I have a URL custom field set. I want users to be able to click this link or as a button and to open the link (which is not my own site) in a new window.

Is there any documentation that you are following?
No. I've never had an issue like this with links so don't know where to find documentation or word the problem for search

Is there a similar example that we can see?

MyWebsiteExample.com
NewLink.com
When clicking the new link it opens in a new tab as "MyWebsite.com/NewLink.com" or similar.
This happens whether new link is just NewLink.com or with www. or with https etc.

What is the link to your site?
hidden link

Actual example links:
hidden link

hidden link

Above I just want to open "transdporttrainingschool.com" in a new tab.

#1980997

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for getting in touch.

This is happens because you are adding the URL to a url field without adding http:// before the actual URL.

You will need to edit your fields to include the http:// to resolve the issue. Secondly I would recommend enabling the field validation for this In your field settings at Toolset -> Custom fields.

This will ensure that only valid URL's are added to the field and prevent this from happening in the future.

Thanks,
Shane

#1985051

That resolved it! thanks for the quick help. Seems to easy now