WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Displaying Category Posts Within Pages (7 posts)

  1. kickintheteeth
    Member
    Posted 7 years ago #

    Hey folks,

    I've been searching the forums for a solution for quite a while, but I can't seem to get exactly what I need.

    I'm also finding the Category Templates page quite confusing.

    I'll try to explain this,

    I have 2 Categorys, Bands and News. Any time I make a post, it'll appear on the main index page. (which i'm going to eventually remove)

    I only require the News Category posts to be displayed on the News Page, and the Bands Category posts to be displayed on the bands page.

    I've tried placing various snippets of code within page templates that I created, but nothing seems to work. I've even tried placing the php from the index.php file into the relevant page template.

    Does this Make sense ?

    Can anyone point me in the right direction as to what I have to do ?

    Thanks for your time, much appreciated.

    Aaron

  2. Chris_K
    Member
    Posted 7 years ago #

    Does this Make sense ?

    No. That's why Category pages exist. They list all articles in the Category.

    Category_Templates are used if you want to style category pages.

  3. kickintheteeth
    Member
    Posted 7 years ago #

    so, is there any way i can create a 'new page' which'll update my main navigation and link directly through to the particular category page ?

    (without having to hardcode it)

  4. Chris_K
    Member
    Posted 7 years ago #

    Humor me for a sec.

    Set your theme to the Default theme. Go have a look at the front page of your blog.

    See that listing of categories in the sidebar? Click one. Now you're looking at your end goal, right? A list of posts associated with that Category.

    Back to the main page. Does that list need to be titled "Categories"? Nope. You can style that however you wish. You can include/exclude cats as well.

    Oh, and just to anticipate a future question... ;-) here's a couple plugins that you could use to NOT have posts in certain categories appear in your main index (I think you hinted at this in your first post?):
    Category Visibility plugin.
    Ultimate Category Excluder plugin.

  5. kickintheteeth
    Member
    Posted 7 years ago #

    Awh crap, I feel like a tool now. (can I blame this on a hangover? )

    I apologise for my stupidity. I've just been styling my site up, and I had all sidebar links set to the same colour as the background. (therefore I'd completely forgotten about the category links actually being there)

    Thanks for that anyway Handy, much appreciated !

  6. Chris_K
    Member
    Posted 7 years ago #

    Eh, don't feel too bad.

    Lot of folks never do make the leap to "get it" :-)

  7. kickintheteeth
    Member
    Posted 7 years ago #

    yeah, it's all coming together now. first time using it and i've been extremely impressed by how powerful it really is.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags