• Resolved CarolWP

    (@carolwp)


    What is the function of the new subcategories? In the past, I have generated subcategories by creating a library that included several categories. One of them was the “main” category and showed by default, but the others could be accessed by clicking on the name of the category.

    So, on the page shown below, the library is Department of Labor. That library includes a category also known as Department of Labor, and also categories Advisory Opinions, ERISA, ERISA Regulations. and Prohibited Transaction Exemptions. The library is set up so that the Department of Labor is the only category shown by default, but clicking on one of the other categories shows the links associated with that category.

    That works, but is fairly clunky. So I thought that the new subcategories might provide a more elegant solution. However, when I move Advisory Opinions, etc., so they are subcategories of Department of Labor, the page just breaks entirely.

    How are the subcategories supposed to be used?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    There are a few different functions for sub-categories.

    – If you are display multiple categories on the same page, the sub-categories will be assigned a CSS class indicating their indentation. The class level0 is assigned to top-level categories, while the class level1 is assigned to sub-categories of the parents, and so on. In your stylesheet, you can do something simple to indent each level, such as:

    .level1 {
    	margin-left: 20px;
    }
    
    .level2 {
    	margin-left: 40px;
    }

    The other function of sub-categories is to do what you are describing. If you activate permalinks mode (https://ylefebvre.ca/wppluginsdoc/index.php/Using_Permalinks), and also activate the option called ‘Hide children categories on top page’ from the Links tab, then you will see the top-level categories on the first page. When you click through, you will see the sub-categories. I need to put a demo of this together, but that is the principle at least.

    Thread Starter CarolWP

    (@carolwp)

    Okay, I think I’ll wait to do this until everything settles down. The first time I tried it, assigning one category to be a subcategory of another broke the whole page. Perhaps I need to do things differently–e.g., only assigning the parent category, not the subcategories, to that library. But since everything is now working, I’ll wait for the demo to change anything else.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Subcategories’ is closed to new replies.