How do I get a category list in WordPress?

4 replies
Hi. I use WordPress, and cannot find a way to have a number of posts show as a list within a category.
For example, on the Amazon home page in the left hand sidebar, if you click the 'books' parent category you can keep drilling down until you get to the last child category. But on WordPress, if I create a subcategory and assign a parent category, all the posts are still listed on the home page. What I am trying to say is I don't want the sub-category posts to be shown as a list until someone has clicked the parent category to 'open' it.
What am I missing that is so simple? Do I need to create pages instead of posts?
#category #list #wordpress
  • Profile picture of the author Kezz
    There's a couple of ways you could do what you need - I'll suggest one.

    Wordpress will show your latest posts by default on the homepage. You can create a new page, name it Home, fill it with a welcome message and then set that page to act as your homepage in the Settings > Reading area of admin.

    Then, you can use a categories widget to allow people to navigate through your categories. Or, if you feel like hitting a little coding up, you can try using the following in your theme:

    PHP Code:
    <?php wp_list_categories(); ?>
    {{ DiscussionBoard.errors[1014601].message }}
  • Profile picture of the author Bounderby
    Thanks.
    I have been using a static Welcome page as a landing page already.
    I have no idea what that code is supposed to do, but I shall investigate available widgets further.
    {{ DiscussionBoard.errors[1014645].message }}
  • Profile picture of the author The Pension Guy
    Bounderby,

    I am trying to understand what is it what you want to achieve. Maybe because we are not talking the same language...
    A "category list" in WordPress means a list of all your categories by name - usually displayed in the sidebar, like
    Fruits
    Apples
    Oranges

    Vegetables
    Carrot
    Tomato

    etc.

    The bold ones are (parent) categories and the italics are sub- or children categories.

    However, I suspect you are talking about POSTS, not categories!

    all the posts are still listed on the home page
    Yes, that's the default in any blogging software. All posts are displayed on the homepage. What else did you expect?
    And, BTW, that's NOT a "list".

    What I am trying to say is I don't want the sub-category posts to be shown as a list until someone has clicked the parent category to 'open' it.
    That doesn't work like that.
    Clicking on any categoy name (in the menu, in the sidebar etc.) will display all the post in that particular category.
    More exactly, when clicking on a parent category - WP displays by default the posts in the parent and all its subcategories. If that is the problem, there are plugins for that; e.g. Kinderloss

    If none of the above covers what you want, you need to sit down and figure out how to ask your question - try using the proper WP terminology.
    Signature

    {{ DiscussionBoard.errors[1014744].message }}
    • Profile picture of the author Sandi Valentine
      Originally Posted by The Pension Guy View Post


      If none of the above covers what you want, you need to sit down and figure out how to ask your question - try using the proper WP terminology.
      Wow - way to be unpleasant about answering a question.

      OP -

      You can also use a nested categories plugin to get the results you're asking for. Try WordPress › Collapsing Categories WordPress Plugins

      HTH

      Sandi
      Signature
      http://sandililly.contently.com
      High Quality Content for .03/word. Order by PM.
      {{ DiscussionBoard.errors[1014914].message }}

Trending Topics