WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So Im just getting started with Custom Post Types. I'm trying to make a custom post called a Certificate. The thing is, I don't need any of the usual 'editor' boxes or anything that would normally be in a post. All I need is an upload form for a user to upload a file.

So I've set up the the Certificate post-type, and I made it so it doesn't support anything, so nothing appears on the page. I then added a 'admin_init' hook to display a form.

But now i'm a little stuck. Can someone give me a breif outline of what hooks to use to process the form? How do I make it so it activates this hook only for 'Certificate' post types?

share|improve this question
have any example form code you wish to share? It'll make it easier to answer. – BandonRandon Oct 10 '11 at 6:19
up vote 0 down vote accepted

Take a look at this answer.

share|improve this answer

You can use the save_post hook. Your hooked-in function examines the posted data and runs a block of code only if the $_POST['post_type'] matches your Certificate type.

The function should also ensure that the user has the authentication and intention of running the particular function.

More information including a full worked example of adding a post meta box and processing the data is included in the WordPress codex at: http://codex.wordpress.org/Function_Reference/add_meta_box

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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