What’s wrong with this query?
-
Why I can’t see the posts on the front page using this query?
<?php $my_query = new WP_Query(‘category_name=posts&showposts=1’);
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>——-Do Action———
<?php $my_query = new WP_Query(‘category_name=posts&showposts=6’);
$countposts = 0;
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<?php if ($countposts == 0) : ?>——-Do Action———
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘What’s wrong with this query?’ is closed to new replies.