jeudi 29 janvier 2015

How to get custom fields from get_post using single page?


Vote count:

0




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;


asked 2 mins ago







How to get custom fields from get_post using single page?

Aucun commentaire:

Enregistrer un commentaire