• mrSparkle

    (@mrsparkle)


    Hi there,

    I’ve been trawling through the forum but can’t seem to find an answer for this. I’ve created a template which I want to use to call a list of posts from a specific category (In this case the category ID is 4).

    Using the following code, I can output all the posts in their entirety however I just want to output the list you would normally see when clicking the category name on the front end.

    Any help would be greatly appreciated!

    Here’s the call I’m currently using:

    <?php if (is_page()) { query_posts(‘cat=4’); } ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael

    (@alchymyth)

    output the list you would normally see when clicking the category name on the front end.

    there is no ‘normally’ – it depends on what is in archive.php or category.php of the theme.

    you could check for the code there.

    if you just want a list of clickable titles, simply delete all the other stull, such as the_content, date, and postmetadata etc from your template file, leave only the line with the linked title of the post in the loop.

    or you could copy archive.php or category.php and save it as category-4.php – http://codex.wordpress.org/Category_Templates

    Thread Starter mrSparkle

    (@mrsparkle)

    Thanks so much for the swift reply. It’s probably the archive template I’m looking for. However I don’t a template that is always applied to category 4.

    I want to create a one off page template and within that call the category 4 list as it appears with archive.php. I was hoping there may be some variation of the call below to facilitate this…

    <?php if (is_page()) { query_posts(‘cat=4’); } ?>

    Thanks again.

    Thread Starter mrSparkle

    (@mrsparkle)

    I guess what I’m trying to do is to call the archive of a specific category.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble figuring out how to call a specific category list’ is closed to new replies.