WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to have a page that lists all posts in one Category? (6 posts)

  1. quixote7
    Member
    Posted 4 years ago #

    My blog covers many topics, and I'd like to pull together on one page all the posts in a given category. So, for instance, in a blog of My Life, I'd like to have a page that contains all posts categorized as At the Beach. Ideally, it would list just the titles as links to the posts themselves.

    I'm not a programmer (at all) so I only have the vaguest idea how to do this. The information in "Template Tags / wp_list_categories" looks like it's close to what I need, but I don't quite get it.

    I understand that I could set At the Beach as 1, and say <?php wp_list_categories('orderby=name&include=1'); ?> But where do I put that code so that the page displays the relevant posts, and so that other parts of the blog treat that as a page? If I just use that in a link on the main page, it's not going to be seen as a proper blog page, if you see what I mean.

    And then, what would the code look like for the page to list titles, not the whole post for each entry?

    I very at sea and hope somebody can help! I think this might be useful for lots of people.

  2. esmi
    Forum Moderator
    Posted 4 years ago #

  3. quixote7
    Member
    Posted 4 years ago #

    Thanks for your answer! (I'm not sure why that page didn't show up in all the searching I did. It's obviously relevant. Maybe Google is *not* my friend?)

    I'm still rather confused, though. Is it saying the categories are already separate pages? If so, why aren't they listed as such? If not, I'm not sure I understand what you do to make a specific category an official blog "page." I've only glanced through that documentation, though. I'll study it properly, and maybe all things will become clear to me.

    Meantime, if there are more pointers anyone wants to share, I can use all the help I can get!

  4. quixote7
    Member
    Posted 4 years ago #

    (I don't know what to make of this. I posted a reply saying Thanks! for your answer, but I can only see it when I'm logged in, and the system says the last comment is yours.

    <O_O>

    I don't know if this one will go live or not. Hope you see at least one of them!)

  5. quixote7
    Member
    Posted 4 years ago #

    (Same thing happened with the last comment. They just disappear, and I'm the only one who can see them, and only when I'm logged in. What's going on here?!)

  6. quixote7
    Member
    Posted 4 years ago #

    (Bizarre. This morning --hours too late!-- all my comments are showing up. I hope this one is more timely.)

    Just wanted to mention that I think I'm sort of getting a handle on it. The weirdest part is that everything revolves around knowing the category ID number, but good old WordPress doesn't actually show that where I'd expect it, on the Category admin page, nor do they let you know how to find it on the Category_Templates instruction page. (Hint, hint, documentation writers!)

    I found the answer here. (The ID may show up in the status bar instead of mouseover, depending on browser.)

    My theme doesn't have a category.php page I could use as a model, so I used archive.php, as per the hierarchy tree. I copied that to category-33.php (the one I want to have as a separate page), and I think I'm on the glide path.

    Thanks again for the link!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.