• 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

#1
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.
 

Brogan

XenForo moderator
Staff member
#2
There is no option for that but you can try hiding them using CSS.
Code:
.node .subForumList
{
    display: none;
}
Regarding this:
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
How are you displaying them?
If they are in the dropdown they won't show until hovered.
 
#3
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?
 

Brogan

XenForo moderator
Staff member
#4
Regarding your code, where do I specify the parent forum in that code?
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
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.
 

EQnoble

Well-known member
#6
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.
 
#8
@EQnoble's suggestion worked beautifully! Put this in EXTRA.css

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

Thanks EQnoble!!