Viewing 3 replies - 1 through 3 (of 3 total)
  • alanft

    (@alanft)

    according to the function reference page here
    http://codex.wordpress.org/Function_Reference/get_post_meta

    your call get_post_meta($post->ID, ‘featured-ads’, false) will return an array not a string, so try that third parameter as true instead

    Thread Starter triggeru571

    (@triggeru571)

    Hey Alan,

    First of all, thanks so much for taking the time to answer. You have a great plugin here.

    global $post; return is_single() && get_post_meta($post->ID, 'featured-ads', true)=='featured';

    still did not work though. The widget simply does not show up across the site. Do you have paid support maybe I can give you access to the admin and you can check out what the issue is if you have time? I tried looking for your own site to hire you but cold not locate it 🙂

    Cheers

    M

    alanft

    (@alanft)

    I don’t do paid support, sorry

    my advice is to use a PHP widget that allows you to look at the output value of various functions so you can work your way to the root of the problem. set a PHP widget up and do something like

    global $post;
    print_r( get_post_meta($post->ID, 'featured-ads', true))

    to see what you’re getting in response

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Use custom field data with widget logic?’ is closed to new replies.