get_post_meta returning post id instead of the value
-
Hey guys, I need some help…
I’ve got this on a page:
<?php query_posts('cat=8'); while (have_posts()) : the_post(); ?> <article class="item"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_directory'); ?>/images/vi_itemThumb.png" alt="<?php the_title() ?>" /> <h2><?php the_title() ?></h2></a> <p><?php get_post_meta(the_ID(), 'blurb', TRUE); ?></p> </article> <?php endwhile; wp_reset_query(); ?>
but the get_post_meta is just displaying the post’s id, I want it to display the contents of the custom field.
What am I doing wrong here?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘get_post_meta returning post id instead of the value’ is closed to new replies.