Save custom post type not working

The issue with meta boxes and saving in general with WordPress is that is is really annoying to debug. This is because of how WordPress does it.

Basically, when you press Publish, WordPress sends an AJAX request to save the post. This is what is calling your save handlers. And when this request returns, it has a Location header in it that tells WordPress what page to redirect to (usually one that displays a message like ‘Post Updated’).

The issue with this is that it just throws any debug statement into oblivion. It makes it absolutely horrendous to debug meta boxes because you never actually see the output during the save routine.

The easiest way to get around this is do put an exit; statement right after your debug message. Yes, the entire page won’t run, but you will be able to see your debug output.


The issue right now I see with your code is you never actually call update_post_meta or add_post_meta. Without using one of those functions to save the data (and then automatically filling in textboxes later with get_post_meta), you will never save your data.