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); ?>

URL: http://codex.wordpress.org/Using_Custom_Fields

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.