How to add an extra field in a post and show it on the template

I’m extremely new to WP. I want to add an extra field to the Post interface and show the content on a template. I don’t want to show the content of the Post, but just the content in the extra field.

Basically what I’m trying to achieve is design a Customer Testimonial page on my website where I show the full testimonial using the extra field, and show the post content as the mini testimonial if you get what Im saying. Please let me know if I need to clarify more. Thanks heaps. I tried custom fields in WP, but not sure how to grab the extra content only. is there a plug out there for this?

Related posts

Leave a Reply

2 comments

  1. You can use a custom field eaisly then call into the template
    (the image shows custom field <– my installation is in hebrew but would look the same and apears under the editor)

    enter image description here

    Then you can get the value of the field like so…

    Inside the loop

    <?php
    $key="customField"; 
    echo get_post_meta($post->ID, $key, true);
    ?>
    

    Outside the loop

    <?php
    global $wp_query;
    $postid = $wp_query->post->ID;
    
    // mykey = field name
    
    $key="customField";
    $result = get_post_meta($postid, $key, true);
    echo $result;
    ?>
    

    .
    Hope this helps… i would use custom post type but
    this is the easy way to add a field to a post

    Good Luck, Sagive.