sajjadmp 72 ارسال شده در تیر 94 گزارش بازنشر ارسال شده در تیر 94 سلام .اگه بخوام تعداد 5 پست را با این تکسونومی فراخوانی کنم باید چه کدی را اضافه کنم ؟<?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video', ) ) ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post();the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); endwhile; else: echo 'no'; endif; wp_reset_query(); ?></li> نقل قول لینک به ارسال
SM-Mahdavi 5427 ارسال شده در تیر 94 گزارش بازنشر ارسال شده در تیر 94 <?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video', 'showposts' => 5 ) ) ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post();the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); endwhile; else: echo 'no'; endif; wp_reset_query(); ?></li> 1 نقل قول لینک به ارسال
sajjadmp 72 ارسال شده در تیر 94 مالک گزارش بازنشر ارسال شده در تیر 94 (ویرایش شده) <?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video', 'showposts' => 5 ) ) ); query_posts( $args ); if ( have_posts() ) : while ( have_posts() ) : the_post();the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); endwhile; else: echo 'no'; endif; wp_reset_query(); ?></li>با تشکر . این کد برای من کار داد :<li><?php $args = array('showposts' => 5, 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-audio', ) ));query_posts( $args );if ( have_posts() ) : while ( have_posts() ) : the_post();the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' );endwhile; else: echo 'no';endif;wp_reset_query(); ?></li> ویرایش شده تیر 94 توسط sajjadmp نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .