Forums

[Plugin: Custom Field Template] url or e-mail link options (10 posts)

  1. asplash
    Member
    Posted 2 years ago #

    Hi, This plugin is brilliant, but I have not found a way of adding an e-mail or URL field which will link by default. Has anyone tried this and got it working?

  2. asplash
    Member
    Posted 2 years ago #

    Still hoping someone has done this - it would be great to have links to other sites and e-mails which I could add through the custom fields.

    Fingers crossed.

  3. Hiroaki Miyashita
    Member
    Posted 2 years ago #

    If you are using the custom field template format, you can do that. Something like this:

    TEMPLATE #0
    [url]
    type = text
    size = 30

    [email]
    type = text
    size = 30

    FORMAT #0

    <a href="[url]">[url]</a>
    <a href="mailto:[email]">[email]</a>

    In the post, use the shortcode like [cft format=0]. I hope this will help you.

  4. apostaganha2
    Member
    Posted 2 years ago #

    And how abour multiple Urls using "select" type?

  5. Hiroaki Miyashita
    Member
    Posted 2 years ago #

    This is an example of multiple urls.

    TEMPLATE #0
    [url]
    type = select
    value = http://www.google.com/ # http://www.yahoo.com/
    outputCode = 0

    [url]
    type = select
    value = http://www.google.com/ # http://www.yahoo.com/
    outputCode = 0

    FORMAT #0
    [url]

    CODE #0
    $value = '<a href="'.$value.'">'.$value.'</a>';

  6. asplash
    Member
    Posted 2 years ago #

    I think I must be missing something. All I can see when the post is published is [url][email] ehey behave like links, but are not creating links based on the values given, the only way I can display a link which works seems to be by putting the whole html <a href=" etc. into the value field.

    In Template #2 I have the title 2 and then

    [url]
    type = text
    size = 30

    [email]
    type = text
    size = 30

    FORMAT #2
    [url]
    [email]

    In the post I have tried

    [cft format=2] [cft template=2]
    and
    [url]
    [email]

    Please can someone who has this working tell me where I am going wrong.

    Many thanks, Jane

  7. jdvroum
    Member
    Posted 2 years ago #

    Hello,

    This post is really interresting but I would like to know what I have to put in the single.php at the bottom ?
    Thanks for your help
    Julien

  8. funnywebcast
    Member
    Posted 2 years ago #

    Hi Hiroaki Miyashita,

    I am wondering if it is possible to send and get published a post with custom fields name / key pair using your plugin and WP Post via-email feature.

    Thanks in advance!

  9. sproet
    Member
    Posted 2 years ago #

    Hi all,

    it's really simple to have a list of links, I use them to add the source of an article whenever I copy something from the web or the newspapers. I have a bunch of regular sources, so this makes it easy to reference the source.

    Create your template like this, with single quotes instead of double ones around the actual url. Just found that out by accident really :)

    [Source]
    type = checkbox
    value = <a hef='http://www.ed.nl/'>Eindhovens Dagblad</a> # <a href='http://www.deweekkrant.nl/de_ahrenberger/'>De Ahrenberger</a>

    That's all folks!

  10. sproet
    Member
    Posted 2 years ago #

    Made a typo, use code below (missed an "r" in

  11. a href
  12. )

    [Source]
    type = checkbox
    value = <a href='http://www.ed.nl/'>Eindhovens Dagblad</a> # <a href='http://www.deweekkrant.nl/de_ahrenberger/'>De Ahrenberger</a>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags