Can you share a link to your blog? What theme are you using? Is the counter a plugin or hard-coded?
Thread Starter
gbaka
(@gbaka)
its php code as in $counter++ and I’m echoing it in the while post loop to get numbers but its going 1 2 3 4 order and i want it in the reverse order so the first post will remain as 1 instead of changing to a 2 so in short i want it to go 4 3 2 1…
Thanks, we also need to know what theme you’re using. And, if you share a link to your blog, it would help quite a bit.
Thread Starter
gbaka
(@gbaka)
I’m using a custom theme and this is basically the code
<?php $titlecount = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php $titlecount++; ?>
<?php echo $titlecount; ?>
<?php endwhile; ?>
this is in the archive.php
Loop through all the posts (without displaying them) to count the total number to display.
Now that you have a total for $titlecount, run the loop again, but this time, decrease the count using $titlecount--
Thread Starter
gbaka
(@gbaka)
thank you that worked like a charm!