احسان 13 ارسال شده در دی 93 گزارش بازنشر ارسال شده در دی 93 سلاممن میخواستم به پستهای کوئری استایل متفاوت بدممن میتونم به پست اول استایل متفاوت بدمولی نمی تونم استایل پستهای دوم تا چهارم رو متفاوت کنمممنون میشم کمک کنید<?php $my_custom_query= new WP_Query(array('post_type' => 'post','post_status' => 'publish', 'cat' => '4','order' => 'DESC','orderby' => 'date', 'posts_per_page' =>'10','paged' => (get_query_var('paged')) ? get_query_var('paged') : 1 ) ); ?> <?php if($my_custom_query->have_posts()) : $count = 0; while($my_custom_query->have_posts()) : $my_custom_query->the_post(); $count++; ?> <?php if ($count == 1) { ?> <div class="col-xs-12 col-md-4 pull-right"> <a href="<?php the_permalink(); ?>"> <?php if(has_post_thumbnail()) the_post_thumbnail('تیتر یک',array('alt' => get_the_title())); ?> </a> <small class="rootitr"> <?php if(function_exists('the_field')) the_field('rootitr'); ?> </small> <div class="well well-sm col-xs-12 col-md-12 pull-right"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> </div> <div class="col-md-4"> <?php } elseif (($count >= 2) and ($count <= 4)) { ?> <div class="col-md-5 pull-right"> <a href="<?php the_permalink(); ?>"> <?php if(has_post_thumbnail()) the_post_thumbnail('تیتر یک',array('alt' => get_the_title())); ?> </a> <small class="rootitr"> <?php if(function_exists('the_field')) the_field('rootitr'); ?> </small> <div class="well well-sm col-xs-12 col-md-12 pull-right"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> </div> </div> <?php } else { ?> <div class="well well-sm col-xs-12 col-md-3 pull-right"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </div> <?php } endwhile;endif;wp_reset_query(); ?> </div> نقل قول لینک به ارسال
A-fshin 1936 ارسال شده در دی 93 گزارش بازنشر ارسال شده در دی 93 درود.بررسی کنیدhttp://forum.wp-parsi.com/topic/25468-%D8%B1%D8%A7%D9%87%D9%86%D9%85%D8%A7%DB%8C%DB%8C-%D8%A8%D8%B1%D8%A7%DB%8C-%D8%AA%D8%BA%DB%8C%DB%8C%D8%B1-%D8%A7%D8%B3%D8%AA%D8%A7%DB%8C%D9%84-%D9%BE%D8%B3%D8%AA-%D9%87%D8%A7-%D8%A8%D8%A7-%D8%A7%D8%B3%D8%AA%D9%81%D8%A7%D8%AF%D9%87-%D8%A7%D8%B2-%D8%B4/ 2 نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .