WordPress.org

Forums

Types
Text as link instead of url itself from URL fields? (3 posts)

  1. kryvulena
    Member
    Posted 2 years ago #

    I'd like to display a Type's URL field's value not as url itself ie. http://domain.com but as a linked text ie. "MY WEBSITE":

    <a href="http://mydomain.com/ target="_blank">MY WEBSITE</a>

    The text/link "MY WEBSITE" would appear only if an url is provided in the Types URL field.

    Is it doable?

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

  2. oturia
    Member
    Posted 2 years ago #

    Have you tried something like this:

    <a href="<?php $key="wpcf-your-link"; echo get_post_meta($post->ID, $key, true); ?>">My Website</a>

  3. mbigul
    Member
    Plugin Author

    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.