• 24-11-2016, 18:22:06
    #1
    Merhaba arkadaşlar,

    $oyuncuadi='Deneme';
    
    $parent_term = term_exists( $oyuncuadi, 'oyuncular' );
    $parent_term_id = $parent_term['term_id'];
    
    if(!$parent_term_id){
    $aaaaaa=wp_insert_term($oyuncuadi,'oyuncular');
    $eklenen_oyuncu=$aaaaaa['term_id'];
    wp_set_post_terms( $postid, $eklenen_oyuncu, 'oyuncular' );
    }else{
    
    wp_set_post_terms( $postid, $parent_term_id, 'oyuncular' );
    $oyuncuresim='http://82.222.152.134/fotogaleri/haber_icerik/images/ogretmen-mazeret-.jpg';
    $get1 = wp_remote_get( $oyuncuresim );
    $type1 = wp_remote_retrieve_header( $get1, 'content-type' );
    $mirror1 = wp_upload_bits($oyuncuadi.".jpg", '', wp_remote_retrieve_body( $get1 ) );
     
    
    $attach_id1 = wp_insert_attachment( $attachment, $mirror1['file'], $postid );
    $attach_data1 = wp_generate_attachment_metadata( $attach_id1, $mirror1['file'] );
    update_tax_meta($parent_term_id, $attach_id1, $attach_data1 );
    }
    Oyuncu var mı yok mu kontrolü çalışıyor.

    Ancak oyuncu yoksa oyuncunun resmini çekmeye çalışıyorum

    Resimde çekiliyor ancak taxonomy alanına kaydetmiyor.

    Teşekkür ederim.

    @truser;
  • 24-11-2016, 22:55:23
    #2
    Halen çözemedim. Gözümün önünde bir yerde ama bulamıyorum

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 21:55:23 -->-> Daha önceki mesaj 20:56:36 --

    sorun forumdaki WP uzmanı @truser; tarafından çözülmüştür.