1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<?php $tmp = $wp_query; $wp_query = new WP_Query("cat=1&posts_per_page=-1"); if(have_posts()): echo "<ul>"; while(have_posts()): the_post(); ?> <li><a href="<?php the_permalink() ?>"<?php the_title() ?></a></li> <?php endwhile; echo "</ul>"; endif; $wp_query = $tmp; ?> |
This will only show 1 category type, its not dynamic depending on a slug or page name