WordPress存档页面"没有帖子" addion

时间:2015-04-29 01:20:23

标签: php wordpress

我的代码:



<?php
$today = date('d/m/Y');
$the_query = new WP_Query( array( 'post_type' => 'show', 'meta_key' => 'date', 'meta_value' => ''.$today.'' ) ); 

// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post(); 
require('post.php');
endwhile;

// Reset Post Data
wp_reset_postdata();
?>
&#13;
&#13;
&#13;

我如何添加&#34; Theres没有帖子&#34;当帖子= 0?

1 个答案:

答案 0 :(得分:1)

只是ad if if和else条件

<div ng-app="myApp" ng-controller="myCtrl as ctrl">
    <button ng-click="ctrl.delete()">delete</button>
    <pre>{{ctrl.test | json}}</pre>
</div>