0
I wonder if you can help me, I’m trying to check if there is any post in a certain category to do validation and if and esle, however without much success so far.
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
<?php if ( have_posts("cat=13") ) { ?>
<?php query_posts("cat=13&showposts=9&paged=$paged"); ?>
Sucesso
} else {
Falhou
?>
<?php } ?>
<?php wp_reset_query();?>
When you say a post, is if you received any data via post ? , if that’s so
if(!empty($_POST['cat'])) { //tem post }
– Flávio Silva
Not some data but literally the post
– Fernando
Try to show an example of how the result would be if you have a post or when you don’t, which is easier to validate
– Flávio Silva
If there is a post in a certain category it displays the normal post, but if there is no post in that category it displays an image stating that it is still in deployment
– Fernando