Custom Content Type Manager
[resolved] How to output option value? (2 posts)

  1. GrayHunter
    Posted 3 years ago #


    I use a dropdown field (select) with distinct option and value (Option:"Red", Stored Value:"#ff0000;").

    When I echo this custom field in my template I get stored value (#ff0000). How can I echo OPTION (Red)?


  2. fireproofsocks
    Plugin Contributor

    Posted 3 years ago #

    Sorry for the late response: I don't police the forums as often as I'd like. If you need to work with "Red" instead of with the "#ff0000", then consider NOT using the option to store separate options/values.

    If you do, however, need to read "Red", then use the get_custom_field_meta() function: http://code.google.com/p/wordpress-custom-content-type-manager/wiki/get_custom_field_meta

    You'll want to use print_r() on the output to help you identify where the data is that you want, e.g. in your theme file:

    $metadata = get_custom_field_meta('my_dropdown');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic