XF 2.2 Remove thread count on forum list

Dixie McCall

Well-known member
Hey I know it's out there but forgot how to remove just the "thread" count on forum list. I do have Mr. Jinx ad-on but it's conflicting with another ad on so have to do it manually. Thanks!
 
Solution
Thank you but this doesn't' show how to remove just thread stats. :)
Sorry, I overlooked that bit.

.node-stats dl.pairs.pairs--rows:first-child and .node-meta dl.pairs.pairs--inline:first-child do select the first element of the node stats which is the thread count. When you give these selectors the property display: none !important; the thread count shouldn't get displayed to anyone visiting your site. If this doesn't solve your problem please specify (best be done with a screenshot pointing out the element) which element you want to customize.

The code for your extra.less template could look like this:
Less:
/* Removes thread counter from every forum in the forum view for everyone */
.node-stats {...

Taminoful

Member
There is no need for an add-on. Have a look at this post for the solution to your problem.

 

Taminoful

Member
Thank you but this doesn't' show how to remove just thread stats. :)
Sorry, I overlooked that bit.

.node-stats dl.pairs.pairs--rows:first-child and .node-meta dl.pairs.pairs--inline:first-child do select the first element of the node stats which is the thread count. When you give these selectors the property display: none !important; the thread count shouldn't get displayed to anyone visiting your site. If this doesn't solve your problem please specify (best be done with a screenshot pointing out the element) which element you want to customize.

The code for your extra.less template could look like this:
Less:
/* Removes thread counter from every forum in the forum view for everyone */
.node-stats {
    dl.pairs.pairs--rows {
        &:first-child {
            display: none !important;
        }
    }
}
.node-meta {
    dl.pairs.pairs--inline {
        &:first-child {
            display: none !important;
        }
    }
}

Or you use the CSS version in your extra.less template, that's up to you:
CSS:
/* Removes thread counter from every forum in the forum view for everyone */
.node-stats dl.pairs.pairs--rows:first-child,
.node-meta dl.pairs.pairs--inline:first-child {
    display: none !important;
}

1620706041511.png

1620706111301.png
 
Last edited:
Solution
Top