Setting Post Date Returning “Notice: A non well formed numeric value encountered”

Ok. Here is an easy fix for that problem. You need to first convert the integer or string to date. See the codes below to understand how to do that: First change this line: $postdate = date($awyear.’-‘.$awmonth.’-‘.$awday.’ ‘.$awhour.’:’.$awminute.’:’.$awsecond); TO $postdate = $awyear.’-‘.$awmonth.’-‘.$awday.’ ‘.$awhour.’:’.$awminute.’:’.$awsecond; Now, convert the $postdate to time string by using strtotime function. $cvtpostdate … Read more

Can wp_insert_post_data filter be used to save custom field data?

You can access the raw $_POST data from the wp_insert_post_data filter, but there are probably better ways to intercept that data. save_post or similar hook would probably work As you are dealing with post_meta, update_post_meta uses update_metadata which provides the update_{$meta_type}_meta and updated_{$meta_type}_meta filters. Those may be the best for you but your question is … Read more

Problem with wp_insert_post

Because you mention an infinite I am guessing that you are hooked into a hook like save_post that fires for wp_insert_post() so if you hook your code into that your code will run then fire the same hook over and over. To avoid that remove the action from the top of your callback: remove_action(‘save_post’,’yourcallbackfunctionname’); $my_post … Read more

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