How do I retrieve the meta info in a template?
-
I’ve added the plugin, and successfully added meta description and keywords to my pages that appears just fine in the front-end source. I’m now trying to retrieve the description to appear in the search results, and I’m getting nada.
This is my code so far:
<a href="<?php the_permalink(); ?>" class="text-wrap"> <h4><?php the_title(); ?></h4> <p> <?php $meta_print_value=get_post_meta(get_the_ID(),'description',true); echo $meta_print_value; ?></p> </a>
But all it’s returning is the title, no description.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How do I retrieve the meta info in a template?’ is closed to new replies.