Current number of Posts in a LOOP
-
Hi !
I want to get the number of posts from the current LOOP (without a custom query) like the one from archiv.php or category.php.
So this is the normal code :
[code]
if (have_posts()) {
while (have_posts()) {
the_post();
..... template sachen
}
}
[/code]
Now i want to get the number of posts from the loop after if have_posts()
[code]
if (have_posts()) {
if (anzahl der posts == 1) {
include ('nureinepost.php')
} else {
while (have_posts()) {
the_post();
..... template sachen
}
}
}
[/code]
Grüße
Ralf
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Current number of Posts in a LOOP’ is closed to new replies.