Hi,
Is it not possible to display post meta data in a archive (category.php) page?
I have tried:
<?php echo get_post_meta($post->ID, 'custom-name', true); ?>
But nothing is displaying.
Hi,
Is it not possible to display post meta data in a archive (category.php) page?
I have tried:
<?php echo get_post_meta($post->ID, 'custom-name', true); ?>
But nothing is displaying.
Are you inside or outside the Loop?
Inside the loop.
Try:
,?php echo '<pre>';
print_r( get_post_meta($post->ID, 'custom-name', true) );
echo '</pre>';
?>I get nothing. And i'am 100% sure i use the correct custom-name and that there is data in it. It is working fine on the post page.
Perhaps something in your archive.php's Loop is causing a problem?
This topic has been closed to new replies.