// 1. Create a database connection $connection = mysqli_connect("localhost","xxxxxxxxxxxxxxx","xxxxxxxxxxxxxxx"); if (!$connection) { die("Database connection failed: " . mysqli_error()); } // 2. Select a database to use $db_select = mysqli_select_db($connection, "xxxxxxxxxxxxxxx"); if (!$db_select) { die("Database selection failed: " . mysqli_error()); } global $wpdb; $sor = $wpdb->get_var("select COUNT(ID) from xxx_posts WHERE post_excerpt='$basligim'");  if($sor==0){ $insert_post = array(); $insert_post['post_title'] = $basligim; $insert_post['post_content'] = $aciklama; $insert_post['tags_input'] = $tetiket; $insert_post['post_status'] = 'publish'; $insert_post['post_author'] = 1; $insert_post['post_category'] = array(1584); $pid = wp_insert_post($insert_post); mysqli_query("UPDATE xxx_posts SET post_content='$aciklama' WHERE ID='$pid'"); $tarih=date("Y-m-d H:i:s"); mysqli_query("UPDATE xxx_posts SET post_modified='$tarih' WHERE ID='$pid'"); add_post_meta($pid, 'imagelink', $imagelinkana); add_post_meta($pid, 'gorbaslik', $gorbaslik); echo '<center>'.$basligim.' <b>Eklendi.</b></center>'; }else{ $query = mysqli_query("SELECT from xxx_posts WHERE post_excerpt='$basligim'"); $pid = $result2[0]; mysqli_query("UPDATE xxx_posts SET post_content='$aciklama' WHERE ID='$pid'"); mysqli_query("SELECT * FROM xxx_posts WHERE post_excerpt = '$basligim'"); update_post_meta($pid, 'imagelink', $imagelinkana); update_post_meta($pid, 'gorbaslik', $gorbaslik); echo '<center>'.$basligim.' <b>Guncellendi.</b></center>';} $aciklama = ''; flush(); ob_get_contents(); ob_flush(); } ?>



Bir de bunu deneyin olacaktır yüksek ihtimalle. Olmazsa bütün sql sorgularını ezsql sınıfına göre (wpde $wpdb değişkeninden tutulu) düzenlemeniz gerekli.