Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter PaulStranger

    (@paulstranger)

    I can not imagine why you all suggest reading the instructions, if the mapping code is not unique for each site. In my case, the code to display the new field has turned out like this:

    <?php $key="field_name"; echo get_post_meta($post->ID, $key, true); ?>

    Thanks for the plug! Creating fields is very convenient, but installation instructions – no.

    Plugin Author Matt Gibbs

    (@mgibbs189)

    Hey – the value depends on the field type in question (and its settings). For example:

    Text fields will always return a string.
    Select fields will always return an array of values.
    WYSIWYG fields will always return an HTML string.
    Loop fields will always return an array of arrays.

    But, some field types have settings that control the output.

    For example, the Hyperlink field type can return either an HTML string OR a PHP array, depending on what’s set for the “Output” setting.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"Array" instead of the desired value’ is closed to new replies.