Eu tentei desta forma para exibir NO da postagem:
<?php
$news_2 = new WP_Query( array ('post_type'=> 'jobs','posts_per_page'=> '10' , 'meta_key' => 'status_for_jobs','meta_value' => '1') );
if ( $news_2->have_posts() ) { while ( $news_2->have_posts() ) { $news_2->the_post();
$count = $news_2->post_count;
?>
<li><h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3></li>
<?php } } ?> <?php wp_reset_query(); ?>
se o NO do post = 0 eu preciso exibir isso: -
<?php
$news_2 = new WP_Query( array ('post_type'=> 'jobs','posts_per_page'=> '10' , 'meta_key' => 'status_for_jobs','meta_value' => '1') );
if ( $news_2->have_posts() ) { while ( $news_2->have_posts() ) { $news_2->the_post();
$count = $news_2->post_count;
if ($count == '0') {
?>
<li><h3><a href="javascript:void(0)">No Post</a></h3></li>
<?php
} else {
?>
<li><h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3></li>
<?php } ?>
<?php } } ?> <?php wp_reset_query(); ?>
Mas, em vez do total de postagens, não recebo nada.
Alguma sugestão para corrigir isso?