Custom Fields
Re-Envisioned
Support General Custom field type > show as ordered list in content, including one link per

  • Creator
    Topic
  • #31545
    Resolved Herbie
    Participant

    Hey,

    So I'm trying to set up a custom field type where I can save references to scientific articles (including the link to the article).

    Then I want to use a shortcode to show these references as an ordered list in the content.

    I think for this, I need a custom field type of type HTML.

    But I can't seem to make it work with custom HTML field type. That field type doesn't allow me to put in any content in the editor of a specific post.

    Is there any way to do this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #31552
    Long Nguyen
    Moderator

    Hi,

    If you just want to insert the URL of the articles, you can use the field type URL and set it cloneable to add more URLs on a post.

    Then use the helper shortcode to show the list URLs on the frontend https://docs.metabox.io/shortcode/

    #31557
    Herbie
    Participant

    Hey,

    Thanks for your reply.

    It has to be a combination of text and URL, not only URL. For example, like this:

    <
    
    ol>
    <li>Busse, F., Omidi, L., Leichtle, A., Windgassen, M., Kluge, E., & Stumvoll, M. (2008). Lead Poisoning Due to Adulterated Marijuana. New England Journal of Medicine, 358(15), 1641–1642. <a href="https://doi.org/10.1056/nejmc0707784">https://doi.org/10.1056/nejmc0707784</a></li>
    <li>...</li>
    
    <
    
    ol>

    That's one element of the list, I want multiple of these elements in the same ordered list

    #31567
    Long Nguyen
    Moderator

    Hi,

    You can try to use the field textarea or wysiwyg. See the list of supported fields here
    https://docs.metabox.io/

    #31572
    Herbie
    Participant

    wysiwyg was what I was looking for. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.