I’m creating a custom post type for my wordpress site. But I want to remove the editor an put a field for uploading files. How do I do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would suggest using the plugin “Advance Custom Fields” which is such a time-saver, awesome plugin, one of few plugins I use for all my WP-projects. It’s easy and slick.
If you really don’t want to use a plugin you can read the documentation here:
http://codex.wordpress.org/Function_Reference/add_meta_box
It has examples on how to add a metabox with custom fields to your post type.
Where $post_type is the slug-name of your post-type.
Edit:
To remove elements like the WSIWYG-editor, you need to specify this when creating the post-type. The “supports” array takes in strings with what you want the post-type to be able to handle.