WordPress.org

Ready to get started?Download WordPress

Forums

Parent Category (5 posts)

  1. CyrilJones
    Member
    Posted 8 years ago #

    Today I made a parent category with the sub-category: "Verslagen". The parent Category is named: "Wedstrijden" .
    Actually I dont want anything posted in Wedstrijden since its just a subject split up in 4 different and smaller subjects where I can post things in..

    Is it anyway possible that when you click "Wedstrijden" you get the "Verslagen" Category beneath it sliding out?

    Or just make clear that Verslagen is a sub-category in someway?

    Because when you look at: http://www.noordkopwaterpolo.com the "Verslagen" sub-category just looks like a normal category?

    Thanks!

  2. Bodhipaksa
    Member
    Posted 8 years ago #

    If I understand you properly, this is quite easy. Go and edit the page called Verslagen and look for "Page parent" on the right-hand menu. Set Wedstrijden as the parent. Then when you save your edit and go back to your blog you'll see that Wedstrijden is below Verslagen and indented.

    What I'd like to know is how to hide sub-subcategories so that only categories and subcategories appear, with sub-subcategories only showing when the subcategory link is clicked on.

  3. CyrilJones
    Member
    Posted 8 years ago #

    Well..you are talking about Pages all the time? And I am talking about Categories.. Right now I updated the category Verslagen that his Parent Category is Wedstrijden. And if you look at my page its still shown as a normal category and not like a sub category with some space or something before it and automatically standing below Wedstrijden.

    Can somebody help please?

    And if you found out how to hide Categories I would like to know to.

    Cyril

  4. petit
    Member
    Posted 8 years ago #

    You can get hiearchical listing of categories, where you may style parent and child categories differently using wp_list_cats. This is what I have - check my right sidbar if you like.

    <ul>
    <li><h2><?php _e('Categories'); ?></h2></li>
    <?php wp_list_cats( 'hierarchical=1' ); ?>
    </ul>

    This will give you a structure like:
    <ul>
    <li>Parent 1</li>
    <li>Parent 2
    <ul>
    <li>Child 1</li>
    <li>Child 2</li>
    <li>Child 3</li>
    </ul>
    </li>
    <li>Parent 3</li>
    </ul>

    It is now possible using CSS to give differnet styles to the first and the second level of categories.

  5. Bodhipaksa
    Member
    Posted 8 years ago #

    Apologies ... wasn't reading carefully enough.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags