开发者

Custom field data not showing on custom post type single

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜