Support » Plugins and Hacks » Not pulling values
3 years, 10 months ago
Ok, I’m having some trouble calling the value of my fields to the front end. Here’s my code:
<?php $title = get_post_meta( get_the_ID(), 'rw_title', true ); ?>
<h3><?php the_title(); ?> | <?php echo $title; ?> </h3>
I tried reading through the tutorials with no luck. Can anyone tell me what I did wrong?
3 years, 9 months ago
<?php $title = rwmb_meta('rw_title'); ?>
It’s a method provided with the Meta-Box.
There are a 2nd parameter used for images/files/etc. and a third parameter to force the post/page ID. Both of them are optional and not needed for text fields.