Forums

Displaying a single Category on Index.php (2 posts)

  1. r_shahin
    Member
    Posted 1 year ago #

    Mornin' folks,
    I'm not sure how I should explain my problem, well, the basic thing is that I wanted to know if I could display a single category posts on Index.php instead of posts from all categories. Now I've seen some answers already been given to this same question but I'm yet to be satisfied, some answers are not clear to me and some I didn't even get a clue what they were talkin about. A post said I could use a small plug-in but I didn't like it. Is there anyway I could use some sort of loop to display a single category? To be more specific, is there anyway I can use a different template for a different category? Now I know it's possible but I need to learn from the scratch so please keep that on your mind. I'm asking about loops cuz I just thought if it was possible then I could just use another file same as INDEX.PHP to display a specific CATEGORY.
    Here's the list of files that I have in my root directory:
    Index.php
    Archive.php
    Single.php
    Function.php
    comments.php
    header.php
    footer.php
    searchform.php
    sidebar.php

  2. MichaelH
    moderator
    Posted 1 year ago #

    but I'm yet to be satisfied

    So what code have you tried that failed? Use http://pastebin.com/ if you have code for others to see.

    Have you tried any of the examples in The Loop, The Loop in Action, or query_posts() articles?

    Other Resources:
    Stepping Into Templates
    Template Hierarchy

Topic Closed

This topic has been closed to new replies.

About this Topic