tags:

views:

19

answers:

1

I have the following on a custom type:

<?php if (get_post_meta($post->ID, 'client_value', true)) { ?><span><?php echo get_post_meta($post->ID, "client_value", true); ?></span><?php } ?>

There is data in client_value but it's not showing on my custom type, it works fine on general posts, just not on custom types. Any ideas why?

A: 

Are you positive that for the custom post type in question, there is definitely a meta entry in the database under the key 'client_value' that matches the post ID?

Whereabouts are you calling this code? Have you tried printing out the contents of $post?

TheDeadMedic
For some reason it couldn't understand $post->ID so I had to create my own variable $my_post_id = get_ID; and call that instead.
Cameron