• 16-06-2010, 17:17:55
    #1
    temamı kendim kodladım, kodlarken hiç fonksiyona gerek olmadığı için functions.php diye bir dosya hiç oluşturmadım. Geçenlerde Yakup GÖVLER'in blogunda Buradaki yazıyı okudum ve functions.php ye ihtiyacım oldu fakat oluşturduğumda sitem hata verdi.

    Kendisi yorumlardan birinde benim durumumda olanlar için bir fonksiyon dosyası vermiş fakat o dosya bende gene hata verdi.


    <?php
    function yg_oto_etiket_ekle($post_id, $post) {
    * $tags = explode(" ", preg_replace('/\s+/',' ',$post->post_title));
    * wp_set_post_tags($post_id, $tags, true);
    }
    add_action('save_post', 'yg_oto_etiket_ekle', 10, 2);
    ?>
    acaba hata çıkarmadan functions.php dosyamı nasıl oluşturabilirim ?
  • 16-06-2010, 19:25:48
    #2
    Default temanınkini kullanabilirsiniz direk.
  • 16-06-2010, 19:39:04
    #3
    Default temaya bu verilen kodu eklediğim zaman gene hata veriyor .
  • 20-06-2010, 22:18:35
    #4
    Hala hata alıyorum bir türlü çözemedim sorunumu. Bilgisi olan yok mu ?
  • 20-06-2010, 23:30:16
    #5
    <?php 
    function yg_oto_etiket_ekle($post_id, $post) {
    $tags = explode(" ", preg_replace('/\s+/', ' ', $post->post_title));
    wp_set_post_tags($post_id, $tags, true);
    }
    add_action('save_post', 'yg_oto_etiket_ekle', 10, 2);
    ?>
    bunu eklemeniz lazım
  • 21-06-2010, 01:29:07
    #6
    seemsiyah adlı üyeden alıntı: mesajı görüntüle
    <?php 
    function yg_oto_etiket_ekle($post_id, $post) {
    $tags = explode(" ", preg_replace('/\s+/', ' ', $post->post_title));
    wp_set_post_tags($post_id, $tags, true);
    }
    add_action('save_post', 'yg_oto_etiket_ekle', 10, 2);
    ?>
    bunu eklemeniz lazım
    Çok teşekkür ederim.