1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Hide child forums on index page only

Discussion in 'XenForo Questions and Support' started by JackieChun, Nov 2, 2015.

  1. JackieChun

    JackieChun Active Member

    Is it possible to:

    1) Hide child forums on the main index page, but show them when the user clicks on the parent forum?

    2) Only have this happen for certain parent forums while continuing to show child forums for other parent forums.

    The use case scenario is that certain parent forums have a lot of child forums (20+), so displaying all of them on the index page is unsightly, while parent forums with only 2-3 child forums are OK.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is no option for that but you can try hiding them using CSS.
    .node .subForumList
        display: none;
    Regarding this:
    How are you displaying them?
    If they are in the dropdown they won't show until hovered.
  3. JackieChun

    JackieChun Active Member

    Thanks Brogan. I am not using dropdown, because I feel that it's not intuitive for members to hover over a parent forum, so they miss a subforum. But the one parent forum that has 60 subforums definitely needs to have those hidden. Actually, a great solution would be to pick and choose which parent forums should have drop downs and which should always display child forums. I suppose that's probably not possible?

    Regarding your code, where do I specify the parent forum in that code?
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You can't.

    It's all or nothing for that particular code.

    However, you may be able to increase the specificity by utilising the node id.
    Use the browser inspector to check the classes.
  5. JackieChun

    JackieChun Active Member

    Ah, but there's no point in hiding then. Switching to hover/dropdown will do. But that's no good if you want some child forums to be prominently displayed without taking up much vertical space.
  6. EQnoble

    EQnoble Well-Known Member

    Link me to your site right quick and I'll see if we can twerk it out. You can convo me that link if you like.
  7. JackieChun

    JackieChun Active Member

    PM sent! Thanks :D
  8. JackieChun

    JackieChun Active Member

    @EQnoble's suggestion worked beautifully! Put this in EXTRA.css

    .forum_list .node_XXXX .subForumList {
    display: none;
    Insert your node number instead of XXXX.

    Thanks EQnoble!!

Share This Page