• 27-06-2015, 01:50:02
    #1
    Herkese merhaba,

    single sayfasında yazarın son yazılarını listeletmeye çalışıyorum, bir sorunum var şu şekilde:

    <?php the_author_ID(); ?>
    Yukarıdaki kod ile yazarın ID'sini alabiliyorum ancak aşağıda ilk satırdaki ID bölümüne yazdıramıyorum.

    <?php query_posts('orderby=date&showposts=4&author=ID'); ?>
    <? while (have_posts()) : the_post(); ?> 
    <?php the_title(); ?>
    <? endwhile; ?>
    ilgilenen herkese şimdiden teşekkürler.
  • 27-06-2015, 02:39:05
    #2
    Kurumsal Üye
    id yerine $curauth->ID kodunu ekleyin.
    http://www.uckan.net
  • 27-06-2015, 10:34:23
    #3
    Uckan destek için teşekkürler, ancak anlamadım nasıl nereye ekleyeceğim.
  • 27-06-2015, 13:12:07
    #4
    Kurumsal Üye
    <?php query_posts('orderby=date&showposts=4&author=$curauth->ID'); ?> 
    <? while (have_posts()) : the_post(); ?>  
    <?php the_title(); ?> 
    <? endwhile; ?>
  • 27-06-2015, 18:28:10
    #5
    uckan emeğinize sağlık, ancak çalışmadı, sitedeki son 4 yazıyı çekiyor.
  • 27-06-2015, 19:47:02
    #6
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <?php query_posts('cat=22&author=id&order=ASC&showposts=-1'); ?> 
    <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    
    <?php endwhile; endif; ?>
    Bu şekilde çalışması lazım, deneyip dönüş yaparmısın. author=id alanındaki id kısmına yazılarını listeleyeceğin yazarın id numarasını yazmalısın.