• 06-04-2020, 14:45:02
    #1
    Üyeliği durduruldu
    Aşağıdaki kodu rastgele çekecek şekilde nasıl değiştirebilirim?

    <?php
        $categories = get_the_category($post->ID);
        $category_ids = array();
    foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
    ?>
    <?php
             query_posts( array(
                'showposts'                => 4,
                'ignore_sticky_posts'    => true,    
                'order'                    => 'dsc',
                'category__in' => $category_ids,
                'meta_key' => 'post_views_count',
                'orderby' => 'meta_value_num',
                'post__not_in' => array($post->ID)
                    )
                );
            ?>
            <?php if (have_posts()) : while ( have_posts() ) : the_post() ?>
  • 06-04-2020, 23:52:43
    #2
    'orderby' => 'rand',
  • 07-04-2020, 13:41:48
    #3
    Üyeliği durduruldu
    Webbilgim adlı üyeden alıntı: mesajı görüntüle
    'orderby' => 'rand',
    Kategori sinirlandirmasini nasil kaldırabilirim