echo or print_r in an admin function

After the save_post hook is executed, the page is redirected, so you’re not able to see the print_r output.

A simple method, if you can afford it, is to do a wp_die() just after the print_r or var_dump.

Or you can check other debugging methods, like FirePHP.

Leave a Comment