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 w开发者_JS百科orks fine on general posts, just not on custom types. Any ideas why?
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
?
精彩评论