Support » Plugin: Pods - Custom Content Types and Fields » Custom fields to store link and its description

  • Resolved bufus

    (@bufus)


    I’m not so sure if the topic title is explicit enough, or if what I want is possible, but I’ll try to explain as best I can.

    I would like to have a custom field (several, in fact) that allows me to store a link and its respective description, name or label.
    I would then create custom fields “link_1”, “link_2”, “link_3”, to which I would attribute the values “Reddit; http://reddit.com”, “Google; http://google.com”, “Wiki; http://wikipedia.org”.
    The goal would be to be able to extract both the assigned description and the respective link, and display them in the template as $link_name .’:’ . $link_url

    Is this even possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jory Hogeveen

    (@keraweb)

    This is currently not possible.
    I did make a dev version if a new link field type: https://github.com/JoryHogeveen/pods-link-field
    This stores the URL, name and target of a link using WordPress’s link popup.
    Not sure if it works with the new block editor but you could test it.

    Cheers, Jory

    Thank you for the reply, @keraweb
    I’m not too worried about usage with the block editor, as I’m doing everything through functions.php (php and html).
    I’ll give it a shot later today and let you know my findings.

    The plugin works fine, integrates well, and I think the current “website” field type could very well be replaced by this “link” field type, although I have no clue about the internals of both.
    It isn’t what I was looking for, though, but again, I doubt it’s possible to implement what I want, so I’ll go with several link fields, instead of one link field with several different contents.
    Thanks again, @keraweb

    Plugin Author Jory Hogeveen

    (@keraweb)

    Ah now I get what you mean.
    And no, this indeed isn’t possible with the built in Pods fields.

    The only think I can think of is to create a advanced content type (ACT) with only an ID, title and link-field. Then create a relationship field to this ACT from your Pod and allow the edit icon. This way you would be able to edit links from within your post.
    Inline editing is currently not supported, only the popup modal.

    Cheers, Jory

    Thanks for the suggestion, @keraweb
    Sounds a bit too advanced for my knowledge, but I’ll take a look into it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom fields to store link and its description’ is closed to new replies.