Hi everybody,
I would like to create such navigation where I have listed all the posts as links from a specific category. I'd also liked to control amount of posts shown per category as well as the order.
For example like this:
PHOTOS 1 2 3 4 5 6 7 8 9
THINGS 1 2 3 4 5 6 7 8 9...and so on...
Every number would be a link to a one post in Photos/Things category.
I searched and found this:
<!--Show posts by category-->
<?php if (in_category('4')) : ?>
<?php $my_query = new WP_Query('cat=4&showposts=15'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
# "><?php the_title(); ?><br />
<?php endwhile; ?>
<?php endif; ?>
<!--End Show posts by category-->
I'm not quite following what's going on there... From what I know the in_category() should be inside a loop to work, if I put this in a loop , it multiplies all the posts (if I have three posts in a category, it shows all them three times). I'm a bit confused with this.
Could some nice person break this down for me? I would appreciate that tremendously! Thanks.