WordPress.org

Ready to get started?Download WordPress

Forums

  1. chatloxx
    Member
    Posted 2 years ago #

    Hey there,

    I'm using Types Fields API and try to echo a "checkboxes" custom field. I put in 6 elements, and checked the value 1, 2 and 5 for a demo.

    echo(types_render_field("my-checkboxes", array("raw"=>"false", "show_name"=>"false"));
    This does almost what i want. It shows: "value1, value2, value5". Now, I want to change the ", " between the values. I want to write the text "or" between them, so it would export "value1 or value2 or value5".

    How can I manage this? It would also be okay to get an array or something, but I have no idea what to do. If I put "raw" to "true", it simply echos the word "Array", but I don't know how to get an array out of it that works correct.

    Thank you so much,
    chatloxx

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

  2. chatloxx
    Member
    Posted 2 years ago #

    Ahhhh, I just did a dumb try to add "separator"=>" or" - and it worked!

    Problem solved. But, does anyone know how to output, how many options I chose? So, as I chose thee of my five options, how can I output the number "3"? Like the size of an array?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic