I have a news page where it display all the news and there is a read more button with a permalink function. When it is clicked it will redirect the user into single page news for more information although I can’t query the custom fields.
post type: news
meta: news
Thank you in advance!
anyway here is my code
$post_id = get_the_ID();
$queried_post = get_post($post_id);
$test = get_custom_field('picture-description', TRUE);
$title = $queried_post->post_title;
echo $title;
echo '<br/>';
echo $test;
echo $queried_post->post_content;
Here are some things you can try:
Make sure your stuff is in a post loop
http://codex.wordpress.org/The_Loop
Try an alternative function
http://codex.wordpress.org/Function_Reference/get_post_meta
Ensure you are in the right file.
Let me know if any of these things work.