WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] how to wrap Type field values inside html tags? (3 posts)

  1. kryvulena
    Member
    Posted 1 year ago #

    Yes, this is a lame question, but I'm not familiar with arrays etc.

    I added checkboxes in my Types fields:

    Option 1
    Option 2
    Option 3

    to create a non-ordered list of options rendered at frontend as:

    • Option 1
    • Option 2
    • Option 3

    but I don't know how to render
    <li>...</li>
    for each list element rendered.

    I tried:

    <ul>
    <?php echo(types_render_field("mylist", array("before"=>"<li>","after"=>"</li>"))); ?>
    </ul>

    but it doesn't work. Only values are being rendered - w/o the html tags.

    I will be very thankful for help.

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

  2. kryvulena
    Member
    Posted 1 year ago #

    I'm also looking for a way to render

    <strong>Element 1</strong>
    so that the "strong" tag is used around the element from Types.

  3. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Dear kryvulena,

    types_render_field will only return the chosen value. Please check this link for more details http://wp-types.com/documentation/functions/#Select

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.