“Internal Server Error” with wp_update_post

Actually, there are 2 issues in your code: You were using PHP custom file name instead of menu_slug. You were not using action and method attributes of form tag. When you were submitting form WordPress redirecting into admin.php?on=Turn+Registration+On which is not a valid page. add_submenu_page function 4th parameter must be unique menu slug of your … Read more

How to disable saving/changing update date for certain admin users?

A bare-bones version would look something like: function deny_post_date_change_wpse_131049( $data, $postarr ) { $user = wp_get_current_user(); // var_dump($user); die; // debugging if (in_array($user->ID,array(14,19))) { unset( $data[‘post_date’] ); unset( $data[‘post_date_gmt’] ); } return $data; } add_filter( ‘wp_insert_post_data’, ‘deny_post_date_change_wpse_131049’, 0, 2 ); I expect that in practice you probably want more complicated logic but that should get … Read more

What are the limitations of wp_update_post()?

You are correct; WordPress will not update custom database columns using wp_update_post() or wp_insert_post(). Instead of creating custom database columns, consider using post meta and/or taxonomy APIs. If you must altar the wp_posts table, you will need to update your custom columns on your own and you may run into issues with various other plugins … Read more