• 01-09-2013, 20:20:12
    #1
    Merhaba Arkadaşlar,


    <?php
    query_posts('p=3565');
    get_option('oyuncular_id');
    echo stripslashes(wp_specialchars_decode( get_option('oyuncular_id') ));
    while (have_posts()) : the_post();
    endwhile;
    ?>

    Yukarıdaki kod ile 3565 numaralı konuyu çağırabiliyorum. oyuncular_id fonksiyonu ile admin panelinden konu id girip onuda yazdırıyorum. Ama p= fonksiyonunda sonra nasıl yazdırabilirim ? Aşağıdaki gibi deneyince sonuç alamıyorum yardımcı olabilirmisiniz.

    <?php
    query_posts('p=oyuncular_id');
    get_option('oyuncular_id');
    echo stripslashes(wp_specialchars_decode( get_option('oyuncular_id') ));
    while (have_posts()) : the_post();
    endwhile;
    ?>


    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 20:20:12 -->-> Daha önceki mesaj 19:42:23 --

    Güncel
  • 01-09-2013, 20:34:35
    #2
    query_posts('p='.get_option('oyuncular_id'));
  • 01-09-2013, 20:37:55
    #3
    ForsBey adlı üyeden alıntı: mesajı görüntüle
    query_posts('p='.get_option('oyuncular_id'));
    <?php
    echo query_posts('p='.get_option('oyuncular_id'));  
    while (have_posts()) : the_post();
    endwhile;
    ?>
    <?php
    query_posts('p='.get_option('oyuncular_id'));  
    while (have_posts()) : the_post();
    endwhile;
    ?>
    yukarıdaki iki yöntemde işe yaramadı. İki tırnak içinde olmalı çünkü el ile yazınca konuyu çağırıyor.

    <?php
    query_posts('p=3565'.get_option('oyuncular_id'));  
    while (have_posts()) : the_post();
    endwhile;
    ?>
  • 01-09-2013, 21:11:32
    #4
    <?php
    $id = get_option('oyuncular_id');
    $konu = get_post($id);
    echo $konu->post_title;
    ?>
    get_post kullanmak daha mantıklı.
    detay : http://codex.wordpress.org/Function_Reference/get_post
  • 01-09-2013, 21:21:24
    #5
    teşekkürler hallettim