I want users to be able to use a car template in new posts. The template will include items such as a photograph of a car, make, model, number of doors, colour of car, etc.
Users will not want to use the template in every one of their posts.
How should I do this? My idea is to:
Create a new widget within the ‘Add new post’ page. This would contain a form in which the user can upload a photograph and enter data (in text input fields).
Once the user has completed the form (within the widget), they could press a button (either in the widget or in the ‘Add new post’ toolbar) which will embed the form data into the new post.
Please can you tell me if this would be a good/best approach, or if I should do it another way.
IMO this ia a good approach. However one thing I would focus is instead of embedding the data into the post body, you may insert custom fields in that post.
This may help you sorting posts based on color, make etc or what ever your fields are.
If you’re still working on this, I think what you’re really trying to do is add custom fields, and then add meta-boxes to the “New Post” that let you edit them. I just did exactly that for the first time, myself, and it’s pretty straightforward. Here’s a really thorough walk-through of how to do just that.