• Hello.
    First thing: thank you for great plugin.

    I’ve just installed it to create a resources directory in my future blog. I have created a couple of categories and 2 subcategories to the 1st of them, just to test it. The issue I found is that while in the admin section subcategories appear nested to their parent (indented), they do not appear to be so in public page.

    At first I thought it could be a problem with the theme but then I checked the HTML code and, both parents, children and single categories (no child) appear to be independent

      tags, instead of

      <UL class="parent>
           <UL class="child">
           </UL>
      </UL>

      (simplified draught code)

      I’ve checked in the admin section and couldn’t find where I can change this (not-so-right) behaviour. Could anyone, please, where could I change that (without modifying the original code). Ty

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

    (@jackdewey)

    The indentation should normally happen based on CSS styling found in the stylesheet editor. Can you check if the default stylesheet was loaded in the plugin’s stylesheet. If it’s empty, click on the button to reset it to its default and you should see indentation of sub-categories.

    Yannick

    Thread Starter hip

    (@hip)

    Hi Yannik.
    Thank you for such a… fast reply. ??

    I followed your suggestion and now I have it visually corrected, thank you. I was referring to the HTML (semantics) though. I may be wrong but I believe a proper recommended approach would be something like:

    <ul>
        <li>Category 1
            <ul>
                <li>Subcategory 1.1
                    <ul>
                        <li>Link 1.1.1</li>
                        <li>Link 1.1.2</li>
                    </ul>
                </li>
                <li>Subcategory 1.2
                    <ul>
                        <li>Link 1.2.1</li>
                    </ul>
                </li>
                <li>Subcategory 1.3
                    <ul>
                        <li>Link 1.3.1</li>
                    </ul>
                </li>
            </ul>
        </li>
        <li>Category 2
            <ul>
                <li>Link 2.1</li>
                <li>Link 2.2</li>
            </ul>
        </li>
    </ul>

    following HTML standards as in https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/HTML_text_fundamentals#nesting_lists

    Another approach would be making use of DL, DT, DD tags. I’ll try to deploy and post an appropriated solution (suggestion) to this case as soon as I have it.

    I’m not meaning your HTML is wrong at all, but I guess semantically it could be improved, taking advantage of native (WordPress & themes) CSS. I may be wrong, of course. And you may have reasons for your code or even not give it the importance I believe it has.

    Thank you in any case. Have a nice day!

    Thread Starter hip

    (@hip)

    I’ve done some quick investigation about definition lists DL about this subject and I don’t think it would be a better approach than the above nested lists solution.

    From the meaning of DLs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl it could fit our purposes but we don’t really need (as for necessary) the definition description details DD tag/field. As for it, DLs could be used here.

    DD tag could contain nested lists: https://stackoverflow.com/a/389117/2623654 but it would bring an unneeded more complex coding.

    Some rendering issues in Chrome (only old versions?): https://stackoverflow.com/questions/389086/is-it-correct-to-nest-html-definition-lists-dl#comment66166993_389117 would be enough, for me, to be discouraged of this option if the nested lists option (OL, LI) does the work.

    Sorry for long replying.

    Long reply short:

    1. visually indentation is corrected after your suggestions
    2. I guess nested lists option (OL, LI) can be a better approach than the one in the plugin
    3. I believe the definition lits DLs option is of no need/hekp here

    Thank you! Have a nice day!
    h

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Nested subcategories’ is closed to new replies.