• 06-09-2010, 16:51:08
    #1
    arkadaşlar kullandığım bir temada popüler yazılar gösterilmekte. benim istediğim popüler yazılar yerine son yazıları göstermek. aslında son yazıları gösteren bir kod var araştırdım ama temaya uyumlu olmadı. çünkü bu kodla tek satırda görünüyor son yazılar. yani tek bir <li> yazılar</li> kodu içerisinde görünüyor. benim istediğim bu yazıların tamamını ayrı göstermek ve temaya uyumlu hale getirmek. yardımlarınızı bekliyorum teşekkürler..
    bulduğum son yazılar kodu:
    Alıntı
    <?php wp_get_archives('type=postbypost&limit=10&format=c ustom'); ?>
    bendeki popüler yazılar kodu:
    Alıntı
    <?php
    $now = gmdate("Y-m-d H:i:s",time());
    $lastmonth = gmdate("Y-m-d H:i:s",gmmktime(date("H"), date("i"), date("s"), date("m")-24,date("d"),date("Y")));
    $popularposts = "SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS 'stammy' FROM $wpdb->posts, $wpdb->comments WHERE comment_approved = '1' AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status = 'publish' AND post_date < '$now' AND post_date > '$lastmonth' AND comment_status = 'open' GROUP BY $wpdb->comments.comment_post_ID ORDER BY stammy DESC LIMIT 10";
    $posts = $wpdb->get_results($popularposts);
    $popular = '';
    if($posts){
    foreach($posts as $post){
    $post_title = stripslashes($post->post_title);
    $guid = get_permalink($post->ID);
    $popular .= '<li><a href="'.$guid.'" title="'.$post_title.'">'.$post_title.'</a></li>';
    }
    }echo $popular;
    ?>
  • 06-09-2010, 16:53:52
    #2
    Googital.com
    <div id="Recent">
    Son Konular
    <ul>
    <?php get_archives('postbypost', 10); ?>
    </ul>
    </div>

    bunu dene
  • 06-09-2010, 17:43:24
    #3
    harikasınız. sabahtır uğraşıyorum bir türlü yapamamıştım. çok teşekkür ederim+rep
  • 06-09-2010, 18:43:27
    #4
    Googital.com
    aeon adlı üyeden alıntı: mesajı görüntüle
    harikasınız. sabahtır uğraşıyorum bir türlü yapamamıştım. çok teşekkür ederim+rep
    yararı olduysa ne mutlu.