I am trying to add a value assigned in the custom field by doing a post in these following steps: I make a new post, add a new custom field where i specify a name and a value.
PHP
I add the following scripts to index.php loop exactly below where the while and its parameter begins and to the HTML where I want the field added respectively
<?php while ( have_posts() ) : the_post(); ?>
<?php the_meta();?>
<?php echo get_post_meta(get_the_ID(), 'key');?>
The hard part for me to understand if i am doing right is the HTML. when i launch the site using firefox and firebug, I detect the post and find the html where the field is supposed to be added. But I noticed that WP automatically generates paragraph tags for the original post, so i honestly dont know where i am supposed to add the get_post_meta for it to be added into my post.
the_content(). – toscho♦ Nov 5 '12 at 2:14