Return to Snippet

Revision: 24636
at March 6, 2010 05:38 by BoNzO


Initial Code
<?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'Your-Custom-Field', true);
wp_reset_query();
?>

Initial URL
http://www.wpbeginner.com/wp-themes/how-to-display-custom-fields-outside-the-loop-in-wordpress/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+wpbeginner+(Wordpress+for+Beginners)

Initial Description

                                

Initial Title
Display Custom Fields Outside The Loop in WordPress

Initial Tags
wordpress, code

Initial Language
PHP