Using Custom Fields « WordPress Codex

/ Published in: PHP
Save to your folder(s)

This will output the resulting meta value (notice the addition of "echo"):

Copy this code and paste it in your HTML
  1. <?php $key="mykey"; echo get_post_meta($post->ID, $key, true); ?>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.