This is my first wordpress site. I am creating a local community site and I want to have similar functionality to freecycle, that is users can offer things to other people for free. So they’d need to be a drop down box to say if the thing was a wanted or an offered item. A title field for the name of the item. Then details of the item. Upload an image of the item and a location field, where people have to pick it up from. Also possibly a contact number field. Plus ideally, I’d like a checkbox system so that if the item was offered to someone the user could tick a box saying offered and then the post would maybe get assigned a category of awaiting collection and the text of it go grey and disappear out of the list of posts. When it was collected, they could click another box which would then give it a category of archive. I don’t even know if any of this is possible though…
If it is though, how is the best way to do this? Considering I want to be able to use these posts on other areas of the site e.g. in a sidebar showing most recent items offered. I also want to be able to add a minimised version of the form which will sit in the sidebar of certain pages, so the user can add an item whilst on a different page.
firstly, I’d recommend having a go at writing custom post types yourself, they’re not that difficult if you follow the instructions in the WordPress Codex: http://codex.wordpress.org/Function_Reference/register_post_type (The Codex is your best friend when it comes to WordPress development!)
If you still have trouble, there are a number of plugins which can help with the creation of custom post types, for example: http://wordpress.org/extend/plugins/custom-post-type-ui/
Lastly, to add custom fields to your custom post types, I’d recommend using a great plugin that I use quite often: http://www.advancedcustomfields.com/ (I’ve found it very reliable and a great time saver as opposed to manually creating custom meta fields)
I definitely recommend investigating how to create custom post types and custom meta fields yourself – if you don’t have time to do it on this build, then make time on your next one. It’s good to know how to do everything manually rather than relying on plugins.
Hope that helps!
there is two ways:
Easy Way – there is composer package for it – wp_stem
here is how to create custom post type and add field to it:
how to install and use it see -> github
WordPress Way (4 steps)–
1. create post type
2. add meta box
3. add field to meta box content
4. listen to save post hook and update value(when you click update post from admin panel).
Use this code in functions.php
And for display
in your post page.