Php 显示职位数目
我在wordpress主题中有以下行代码,我只想显示4或5篇文章。我要补充什么Php 显示职位数目,php,jquery,wordpress,Php,Jquery,Wordpress,我在wordpress主题中有以下行代码,我只想显示4或5篇文章。我要补充什么 <div class="mvp-feat1-list-head-wrap left relative"> <ul class="mvp-feat1-list-buts left relative"> <li class="mvp-feat-col-tab">&l
<div class="mvp-feat1-list-head-wrap left relative">
<ul class="mvp-feat1-list-buts left relative">
<li class="mvp-feat-col-tab"><a href="#mvp-feat-tab-col1"><span class="mvp-feat1-list-but"><?php esc_html_e( 'Latest', 'zox-news' ); ?></span></a></li>
<?php query_posts(array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video' )) )); if (have_posts()) : ?>
<li><a href="#mvp-feat-tab-col2"><span class="mvp-feat1-list-but"><?php esc_html_e( 'Videos', 'zox-news' ); ?></span></a></li>
<?php endif; wp_reset_query(); ?>
<?php query_posts(array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-gallery' )) )); if (have_posts()) : ?>
<li><a href="#mvp-feat-tab-col3"><span class="mvp-feat1-list-but"><?php esc_html_e( 'Galleries', 'zox-news' ); ?></span></a></li>
<?php endif; wp_reset_query(); ?>
</ul>
</div>
Pass'posts\u per\u page'=>2
在数组中
-
-
浏览此处:
<div class="mvp-feat1-list-head-wrap left relative">
<ul class="mvp-feat1-list-buts left relative">
<li class="mvp-feat-col-tab">
<a href="#mvp-feat-tab-col1"><span class="mvp-feat1-list-but"><?php esc_html_e( 'Latest', 'zox-news' ); ?></span></a>
</li>
<?php
query_posts(array('posts_per_page' => 5,'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video' )) ));
if (have_posts()) : ?><li><a href="#mvp-feat-tab-col2"><span class="mvp-feat1-list-but"><?php esc_html_e( 'Videos', 'zox-news' ); ?></span></a></li>
<?php endif; wp_reset_query(); ?>
<?php query_posts(array('posts_per_page' => 5,'tax_query' => array( array( 'taxonomy' => 'post_format', 'field'=> 'slug', 'terms' => 'post-format-gallery' )) )); if (have_posts()) : ?>
<li>
<a href="#mvp-feat-tab-col3">
<span class="mvp-feat1-list-but">
<?php esc_html_e( 'Galleries', 'zox-news' ); ?>
</span>
</a>
</li>
<?php endif; wp_reset_query(); ?>
</ul>
</div>