• Resolved wmguk

    (@wmguk)


    Hi,

    I have a new custom field in my wordpress system, called Area Colour.

    I need to find out the value for each page for that field.

    I have checked my database and the details are:

    meta_id: 695 | post_id: 6 | meta_key: areacolour | meta_value: Red

    I’ve used $skinName2 = get_post_custom_values($key, $post_id); but all I get when I echo $skinName2 is “Array”

    Any ideas what I am doing wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Anonymous User

    (@anonymized-3085)

    use get_post_meta instead Function Reference/get post meta

    Thread Starter wmguk

    (@wmguk)

    hi ya,

    I’ve just tried:

    $key = 'Area Colour';
    $post_id = '6';
    $single = 'true';
    
    $skinName2 = get_post_meta($post_id, $key);

    and I get ARRAY

    then I tried:

    $key = 'Area Colour';
    $post_id = '6';
    $single = 'true';
    
    $skinName2 = get_post_meta($post_id, $key, $single);

    And there is no output…

    What have I missed?

    Thread Starter wmguk

    (@wmguk)

    ugh! its the $key = ‘Area Colour’;

    It should have been $key = ‘areacolour’;

    !!! Working Now !!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get_post_custom_values – Can I use this?’ is closed to new replies.