Posted By

Savio on 10/27/10


Tagged

wordpress field custom


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vehler


Custom Fields in Wordpress


 / Published in: PHP
 

  1. // Syntax for custom field call //
  2.  
  3. <?php get_post_meta($post_id, '$key', $single); ?>
  4.  
  5.  
  6. // Example, First set Custom Field in "Create Post" or use "Custom Field Template"-Plugin. In this case I create the field "CustomPower". Then call the field via get_post_meta. Easy :) //
  7.  
  8. <p class="whatever"><?php echo get_post_meta($post->ID, 'customPower', true); ?></p>

Report this snippet  

You need to login to post a comment.