poriia 6 ارسال شده در اسفند 92 گزارش بازنشر ارسال شده در اسفند 92 (ویرایش شده) سلامتوی نت زیاد سرچ کردم و به کد orderby=rand رسیدم ولی مشکلم اینه که مطالب قالبم با کد خاصی لود میشه. هرچی سعی کردم نتونستم از این خاصیت استفاده کنم. کد زیر مال بخش مربوط به قالب هست: <?php if (arras_get_option('enable_news')) : ?> <?php arras_above_index_news_post() ?> <!-- News Articles --> <div id="index-news"> <?php if (arras_get_option('news_title') != '') : ?> <div class="home-title"><?php _e(arras_get_option('news_title')) ?></div> <?php endif; ?> <?php $news_query_args = apply_filters('arras_news_query', array('list' => $news_cat, 'taxonomy' => arras_get_option('news_tax'), 'query' => array('posts_per_page' => arras_get_option('index_count'), 'exclude' => $post_blacklist, 'post_type' => arras_get_option('news_posttype'), 'paged' => $paged))); $news_query = arras_prep_query($news_query_args); query_posts($news_query); ?> </div><!-- #index-news --> <?php arras_below_index_news_post() ?> <?php endif; ?> حتی این کد هم زدم ولی نشد: query_posts($news_query . 'orderby = rand'); ویرایش شده اسفند 92 توسط poriia نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در اسفند 92 گزارش بازنشر ارسال شده در اسفند 92 سلامتوی نت زیاد سرچ کردم و به کد orderby=rand رسیدم ولی مشکلم اینه که مطالب قالبم با کد خاصی لود میشه. هرچی سعی کردم نتونستم از این خاصیت استفاده کنم. کد زیر مال بخش مربوط به قالب هست: <?php if (arras_get_option('enable_news')) : ?> <?php arras_above_index_news_post() ?> <!-- News Articles --> <div id="index-news"> <?php if (arras_get_option('news_title') != '') : ?> <div class="home-title"><?php _e(arras_get_option('news_title')) ?></div> <?php endif; ?> <?php $news_query_args = apply_filters('arras_news_query', array('list' => $news_cat, 'taxonomy' => arras_get_option('news_tax'), 'query' => array('posts_per_page' => arras_get_option('index_count'), 'exclude' => $post_blacklist, 'post_type' => arras_get_option('news_posttype'), 'paged' => $paged))); $news_query = arras_prep_query($news_query_args); query_posts($news_query); ?> </div><!-- #index-news --> <?php arras_below_index_news_post() ?> <?php endif; ?> حتی این کد هم زدم ولی نشد: query_posts($news_query . 'orderby = rand'); <?php if (arras_get_option('enable_news')) : ?> <?php arras_above_index_news_post() ?> <!-- News Articles --> <div id="index-news"> <?php if (arras_get_option('news_title') != '') : ?> <div class="home-title"><?php _e(arras_get_option('news_title')) ?></div> <?php endif; ?> <?php $news_query_args = apply_filters('arras_news_query', array('list' => $news_cat, 'taxonomy' => arras_get_option('news_tax'), 'query' => array('posts_per_page' => arras_get_option('index_count'), 'exclude' => $post_blacklist, 'post_type' => arras_get_option('news_posttype'), 'paged' => $paged,orderby=>'rand'))); $news_query = arras_prep_query($news_query_args); query_posts($news_query); ?> </div><!-- #index-news --> <?php arras_below_index_news_post() ?> <?php endif; ?> 5 نقل قول لینک به ارسال
poriia 6 ارسال شده در اسفند 92 مالک گزارش بازنشر ارسال شده در اسفند 92 (ویرایش شده) درست شد، آرگومان باید به صورت زیر باشه:'orderby' => 'rand' ویرایش شده اسفند 92 توسط poriia نقل قول لینک به ارسال
imanfakhar 26231 ارسال شده در اسفند 92 گزارش بازنشر ارسال شده در اسفند 92 درست شد، آرگومان باید به صورت زیر باشه:'orderby' => 'rand'بستگی داره شکل های مختلفی داره که در کوئری شما اینگونه بود 3 نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .