In my new custom theme I want my user to be able to add a ‘customer testimony’. All I need for each entry is a plain text area for the content of the testimony and a text input for the author of the testimony (i.e. who said it). My question is what would you use to create this custom post type or something else?
My initial endeavour was to create a custom post type but without any of the normal fields. This has meant that in the column list view there is no way to link through to edit the entry as I am not using ‘title’. This makes me think that I shouldn’t be using custom post types for this. So should I be using creating a plugin that creates it’s own database or something?
Any help would be much appreciated. Thanks.
Okay could I ask for a little more help. I have put this into my save_post action:
`$my_post = array(); $my_post['ID'] = $post->ID; $my_post['post_title'] = $_POST["testimony_author"]; wp_update_post( $my_post );`
And it does make the changes to the post in the database but stalls when you actually click save on the page. Any ideas?
If I were setting up this custom taxonomy, I would use only two fields: title and content. If it’s there and it fits your needs then it is best to use it IMHO. Title can be used for the name of the person who wrote the testimonial and content would be used for the testimonial itself. You will have to write little to no php to get this to work and your front-end loops will look just like other WordPress loops.
Just enable the title – you don’t need to display it.