Sizin sorgunuz:
$wpdb->query("INSERT INTO wp_posts(post_title, post_content, post_excerpt,post_date,post_category)
VALUES('$baslik', '$adres','$adres',now(),'$cat')");
$last_inserted_id = $wpdb->insert_id;
echo $last_inserted_id;Olması gereken:
$wpdb->insert('wp_posts', array(
'post_title' => $baslik,
'post_content' => $adres,
'post_excerpt' => $adres,
'post_date' => current_time('mysql', 1),
'post_category' => $cat
));
echo $wpdb->insert_id;Mobilden yazıyorum, yanlış yazmış olabilirim. Sonucu burada belirtirseniz ona göre yardımcı olmaya çalışayım.
[/PHP]
Olması gereken:
$wpdb->insert('wp_posts', array(
'post_title' => $baslik,
'post_content' => $adres,
'post_excerpt' => $adres,
'post_date' => current_time('mysql', 1),
'post_category' => $cat
));
echo $wpdb->insert_id;aynen bu şekilde yapıyorum ve ne gariptir ki wp_posts a veri gönderemiyorum :S akşamdan beri 1 mm bile ilerleyemedim