• Resolved quixote7

    (@quixote7)


    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter quixote7

    (@quixote7)

    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!

    Thread Starter quixote7

    (@quixote7)

    (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!)

    Thread Starter quixote7

    (@quixote7)

    (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?!)

    Thread Starter quixote7

    (@quixote7)

    (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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to have a page that lists all posts in one Category?’ is closed to new replies.