List posts from this category in sidebar (1 post)

  1. jamiedustuk
    Posted 6 years ago #

    Hi, I am looking for a way to display posts from the category I am currently in, in the sidebar.

    I can use<?php query_posts('showposts=-1&order=ASC&title_li=Articles'); ?> but this displays posts in all categorys, I know I can add cat=1 or whatever but then I would have to have a different template for each category, I just want one line of code that will query posts for the category I am currently viewing, thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic