Support » Plugins » Retrieve only one value from a certain key

  • I spent the last hour reading through the related topics in the codex but I couldn’t find anything.

    What I’m trying to do is to get one specific value from a custom field which has several values.

    e.g.:

    color: Blue
    color: Red
    color: Green

    when I use echo get_post_meta($post->ID, ‘color’, true)I simply get Green as an output. However I would like to be able to define which value I get. Do the values have individuals numbers assigned to them which can be called, or is this only possible with a loop?

  • The topic ‘Retrieve only one value from a certain key’ is closed to new replies.