Generate slug and meta data if meta field is empty

Ok, after a little playtime, here is the answer: add_action(‘save_post’, ‘ocp_jobs_save_details’); function ocp_jobs_save_details(){ global $post; $genref = sanitize_title( dechex( time() ) ); if ( $post->post_type == ‘job’ ) { if ( $_POST[‘ocp_jobs_ref’] ) { $jobs_args = array( ‘ID’ => $post->ID, ‘post_name’ => strtolower( sanitize_title( $_POST[‘ocp_jobs_ref’] ) ) ); $myref = strtoupper( $_POST[‘ocp_jobs_ref’] ); } else{ … Read more

Connection Reset on post/page save

If you are running mod_security or anything like that would be first thing to check. Security modules are server are known to react badly to WP’s POST requests. That is consistent with circumstances you describe (post saves, Ajax).

Custom metabox does not store data

Are you sure it isn’t saving the values to the DB? Perhaps it’s just not displaying the previously saved values in your form? $values = get_post_custom( $post->ID ); This is what you are using to get your meta – but this returns a multi-dimensional array. Therefore when accessing your beef_meta_box_price value, you need to use … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)