WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Custom Feild URL not linking out correctly (11 posts)

  1. AmandaBergsma
    Member
    Posted 1 year ago #

    Hello

    Have custom feilds "URL" where they have type in their URL, but when you click the link, it trying to open the link after the domain.

    "http://greaterthoroldbusinesscouncil.com/www.cibc.com"

    I can't seem to find the option to make it load in a blank window...

    http://greaterthoroldbusinesscouncil.com
    (any of the business directory posts with a URL)

    http://wordpress.org/extend/plugins/types/

  2. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi AmandaBergsma,

    Hope you are using Types and WordPress latest. Please share the code that you are using for listing URL values.

    [ Signature moderated. ]

  3. mangoman
    Member
    Posted 1 year ago #

    I think the simple question is: How to make the link open in a new window automatically, using the standard target="_blank" code.

    For example, how would I assure that your string opens the following output in a new window (because it doesn't):

    <?php echo(types_render_field("sitio", array("show_name"=>"true","output"=>"html"))); ?>

    Thanks.

  4. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi mangoman,

    Sorry this feature is not supported in Types. We are considering it in futures.

    [ Signature moderated. ]

  5. AmandaBergsma
    Member
    Posted 1 year ago #

    Hello

    I have set up a Custom Post type "Business Directory"

    In that, I have a Custom Field I am using the "URL" one and attaching to it to see in a "Business Directory".

    In the template I am using the following code:

    <b>Web:</b> <?php echo(types_render_field("website", array())); ?><br/>

    I can get the like to show up and link, but like before it is already adding my domain in front of theirs.

    "http://greaterthoroldbusinesscouncil.com/www.cibc.com"
    instead of
    "http://www.cibc.com"

    I have the exact same set up for the email, and that works with no problems.

  6. AmandaBergsma
    Member
    Posted 1 year ago #

    Hello

    I figured out the problem. In the field, they where not adding the " http://" in front of the "www.etc.com" Therefor it was not linking out correctly.

    Is there a way to update the code so the display name can be different then the link?

  7. mangoman
    Member
    Posted 1 year ago #

    Actually, when the http:// is in the field, it functions but it still doesn't open in a new tab/window. :-(

    Something this standard should be the default functionality (as well as auto-detecting if http:// is present or not). I tried several 'external links' plugins - but they didn't work with Types, so if you know how to modify the code to achieve this "target=_blank" behavior in the links, please let me/us know!

    Thanks!

  8. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi AmandaBergsma & Mangoman,

    We will try to incorporate this features in upcoming version. Thanks your feedback.

    [ Signature moderated. ]

  9. mangoman
    Member
    Posted 1 year ago #

    That would be great!

    Meanwhile, I installed & tested the WP External Links plugin to achieve the <target="_blank"> function. That plugin is available here:
    http://www.freelancephp.net/wp-external-links-plugin/

    Thanks again for your support.

  10. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mangoman,

    Thank you for the updates. You are welcome.

    [ Signature moderated. ]

  11. mangoman
    Member
    Posted 1 year ago #

    Thanks.

    I recommend using the WP External Links plugin until they include this feature. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.