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?

| improve this question | | | | |

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

echo get_post_meta($post->ID, $key, true);

Outside the loop

global $wp_query;
$postid = $wp_query->post->ID;

// mykey = field name

$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.

| improve this answer | | | | |

You can use the built-in custom fields in WordPress as mentioned above, I also personally recommend Advanced Custom Fields. A great plugin with tons of useful documentation and a pretty active support area. Thanks!

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.